Commit Graph

17 Commits

Author SHA1 Message Date
Javi Martín
0d35bddf9e Simplify finding the booth assignment for a voter 2023-08-30 14:46:34 +02:00
Javi Martín
8b13daad95 Add and apply rules for multi-line hashes
For the HashAlignment rule, we're using the default `key` style (keys
are aligned and values aren't) instead of the `table` style (both keys
and values are aligned) because, even if we used both in the
application, we used the `key` style a lot more. Furthermore, the
`table` style looks strange in places where there are both very long and
very short keys and sometimes we weren't even consistent with the
`table` style, aligning some keys without aligning other keys.

Ideally we could align hashes to "either key or table", so developers
can decide whether keeping the symmetry of the code is worth it in a
case-per-case basis, but Rubocop doesn't allow this option.
2023-08-18 14:56:16 +02:00
Javi Martín
ea2aeab383 Apply rubocop Rails/FindBy rule everywhere
We didn't detect these cases because by default the rule only searches
for offenses in `app/models/`.
2019-11-08 19:15:04 +01: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
voodoorai2000
29f5268e42 Display polls for current booth
Polls that were not votable by a user were not being displayed in the officing interface. Creating a confusing situation for officers.

With this commit polls that are not votable by a user will be displayed, with the corresponding message explaining that that poll can only be voted by residents of a certain geozone.
2019-05-24 15:20:54 +02:00
Bertocq
69bcd8ec9a Set booth and officer assignments to Poll Voter on officing panel 2019-03-28 15:47:52 +01:00
rgarcia
74706027cb fixes specs 2019-03-28 15:47:52 +01:00
rgarcia
b4499321d3 stores officer booth on sign in 2019-03-28 15:47:52 +01:00
rgarcia
5835d12694 stores the officer that allowed a voter to vote in a physical booth 2019-03-28 15:47:52 +01:00
Bertocq
24ef7984a3 Include the answerable by user scope back on Poll list for officer voting panel 2017-10-04 17:05:25 +02:00
Bertocq
2900104a07 Show only active polls from the shifts assigned to officer on vote panel 2017-10-04 13:11:13 +02:00
Bertocq
e928eb38ac Add Officer relationship to Poll Voter 2017-10-04 00:39:31 +02:00
rgarcia
085991c624 allows voting only in one origin: booth or web 2017-10-02 16:22:31 +02:00
kikito
9c1a5847de uses answerable_by instead of current in voters controller 2017-02-02 16:53:57 +01:00
rgarcia
6c34599e1e adds officer residence check and user voting 2017-01-29 00:36:20 +01:00
Juanjo Bazán
0953a536af adds recounting to officing 2017-01-03 22:23:54 +01:00
rgarcia
503338e47b adds view placeholders for officing polls 2016-11-14 13:51:09 +01:00