Commit Graph

17 Commits

Author SHA1 Message Date
Javi Martín
69dda19af7 Add and apply Rails/PluckId rubocop rule 2021-08-09 23:52:47 +02:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javi Martín
a21240b230 Use Date.current and Time.current
Using Date.today and Time.now might lead to inconsistencies if the time
zone the application uses is not the same as the system time zone.
2019-08-28 20:32:40 +02:00
Julian Herrero
8e0bbf54f6 Replace harcoded images and documents settings 2019-06-04 11:50:09 +02:00
Javi Martín
c43b0fea64 Use Rails 5 conventions in Dashboard
These models and migrations were added on a branch based on Rails 4.
2019-04-29 13:08:43 -05:00
decabeza
91be3cf775 Fix more hound warnings 2019-03-27 15:22:14 +01:00
Alberto
29a87e2746 Merge branch 'dashboard' into dashboard-polish 2019-03-26 12:19:20 +01:00
taitus
8b1c458fdf Allow detect new actions since a custom date
- Rename method "detect_new_actions" to "detect_new_actions_since". Add new param date.
2019-03-21 12:29:31 +01:00
taitus
5177adb32a New rake task for proposals to send new action email
Execute rake task every day to detect new actions available for not archived proposals. If there are new actions available for today, send email to proposal's author with information text, new actions available and link to proposal dashboard url.
2019-03-21 12:29:28 +01:00
taitus
868c37ef35 Detect new actions for proposals
Create new Dashboard::Action class method to detect new actions between yesterday and today for a proposal.
- Published proposal: Only detect new actions with "published_proposal" field eq true
- Draft proposal: Only detect new actions with "published_proposal" field eq false
2019-03-20 11:50:46 +01:00
decabeza
3f1d3f3443 Fix hound warnings 2019-03-19 18:24:49 +01:00
Alberto
501f6257bf Merge pull request #3260 from Platoniq/dashboard-actions-for-published-proposals
Dashboard actions for published proposals
2019-03-19 16:20:47 +01:00
taitus
9fac661f0c Create scope by_proposal
Add to active_for class method and to active_resources controller method the new scope by_proposal.
 - Published proposal: display all actions.
 - Draft proposal: only display actions for draft proposals.
2019-02-10 00:18:50 +01:00
taitus
054bbc5d7b Allow zip, png and jpeg on dashboard action. 2019-02-02 15:30:33 +01:00
Juan Salvador Pérez García
ee83238e32 Scope refactoring
complex scopes in Dashboard::Action have been refactored into static
methods. Specs for refactored scopes have been added as well.
2018-09-18 10:59:32 +02:00
Juan Salvador Pérez García
5b5095b37b Bugfixing and several enhancements
* Added missing specs
* Removed models that were refactored previously
* Added simplecov when executing specs locally
* Fixed bug in poll model validation that was causing an 500 error.
2018-08-01 13:26:30 +02:00
Juan Salvador Pérez García
e5f9cf6710 Fixed #239
Proposals dashboard refactored to dashboard.
Added missing specs for the dashboard.
2018-07-24 15:52:43 +02:00