Commit Graph

20 Commits

Author SHA1 Message Date
Javi Martín
522eb6cfa3 Add and apply Rails/SelectMap rule
This rule was introduced in rubocop-rails 2.21.0. Using `pluck` is
easier to read.
2023-11-20 14:22:12 +01:00
Javi Martín
5b6de96241 Add and apply MultilineMethodCallIndentation rule 2023-08-18 14:56:16 +02:00
Javi Martín
09c63e354c Add and apply Layout/DotPosition rule
Since IRB has improved its support for multiline, the main argument
towars using a trailing dot no longer affects most people.

It still affects me, though, since I use Pry :), but I agree
leading dots are more readable, so I'm enabling the rule anyway.
2023-08-18 14:56:16 +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
Julian Herrero
d24376f6ad Use double quotes in controllers/ 2019-03-13 22:19:49 +01:00
Bertocq
4fb9f6829c Extract inline query to an OfficerAssignment scope 2018-02-19 11:09:19 +01:00
rgarcia
f2d99d6747 searches for officers assigned to a poll 2017-10-13 18:39:13 +02:00
Bertocq
b5cf28cb35 Swap Poll White/Null/Total usage for Poll Recount 2017-10-02 15:46:49 +02:00
BertoCQ
34568567a3 Merge pull request #1885 from consul/chore/remove_final_recounts
Remove Poll Final Recounts, replace with Total Results
2017-09-20 23:00:03 +02:00
Bertocq
a3bf69e78d Remove final result usage on admin poll officer assignments results 2017-09-19 01:13:04 +02:00
Angel Perez
0b708397df Add base controller for Admin:Poll controller
Fixes #1848

On branch aperez-fix-for-issue-1848
  Changes to be committed:
    new file:   app/controllers/admin/poll/base_controller.rb
    modified:   app/controllers/admin/poll/booth_assignments_controller.rb
    modified:   app/controllers/admin/poll/booths_controller.rb
    modified:   app/controllers/admin/poll/officer_assignments_controller.rb
    modified:   app/controllers/admin/poll/officers_controller.rb
    modified:   app/controllers/admin/poll/polls_controller.rb
    modified:   app/controllers/admin/poll/questions_controller.rb
    modified:   app/controllers/admin/poll/recounts_controller.rb
    modified:   app/controllers/admin/poll/results_controller.rb
    modified:   app/controllers/admin/poll/shifts_controller.rb
2017-09-13 12:22:57 -04:00
rgarcia
9181610de9 removes obsolete code 2017-08-04 21:27:30 +02:00
Bertocq
361e0efe00 Remove Poll Recount model and all usages 2017-07-23 23:29:24 +02:00
Bertocq
69f4e1c683 Fix all rubocop Metrics/LineLength issues (140+) 2017-07-10 13:22:49 +02:00
Juanjo Bazán
1b2061f95b fixes date/datetime comparison 2017-02-17 15:27:04 +01:00
Juanjo Bazán
8129131a3c adds pagination to officer assignments 2017-02-14 19:09:19 +01:00
Juanjo Bazán
19ec7f93b3 extracts officer_assignments from admin's poll/show 2017-02-14 13:47:33 +01:00
Juanjo Bazán
547168be3f adds recounts to poll_officer view in admin zone
Admin can see recounts and final recounts made by poll_officer next to
their officing shifts
2017-01-31 12:38:53 +01:00
Juanjo Bazán
05f054ece4 adds final recount/results shift for officers from Admin 2017-01-30 17:44:39 +01:00
Juanjo Bazán
40f6ca5886 adds poll shift management to admin 2016-12-27 17:47:15 +01:00