Julian Herrero
c563f73189
create officer assignments in order
...
Make sure we create the Poll::OfficerAssignments in the same order the
booth_assignments where previously created. So the spec "Poll::Shift
officer_assignments creates and destroy corresponding
officer_assignments does" not fail.
2018-11-23 18:15:47 +01:00
Juanjo Bazán
4cccb93677
fix poll accuracy results using floats
2018-11-11 14:54:35 +01:00
Javi Martín
ccdbdb26ba
Fix poll question with non-underscored locales
...
Ruby can't have hyphens in method names, so sending something like
`title_pt-BR=` would raise an exception.
2018-10-23 14:23:10 +02:00
Javi Martín
863b326142
Validate both the model and its translations
...
This way we guarantee there will be at least one translation for a model
and we keep compatibility with the rest of the application, which
ideally isn't aware of globalize.
2018-10-22 16:30:28 +02:00
Javi Martín
2ab49a1832
Refactor globalize models code using a concern
...
I've chosen the name "Globalizable" because "Translatable" already
existed.
2018-10-22 16:28:53 +02:00
Javi Martín
e0b9c1bfdd
Update poll question answers translatable fields
...
We needed to bring back support for CKEditor in our translatable form,
which we had temporarily remove.
And now we support CKEditor in our translatable specs, and so we can
remove the duplicated specs for poll question answers.
2018-10-22 16:13:48 +02:00
Javi Martín
d1249d0b4f
Update poll questions translatable fields
...
We need to replace ".title=" by ".title_#{locale}=" in one place because
for some reason globalize builds a new translation record when using the
latter but it doesn't build one when using the former.
2018-10-22 16:13:30 +02:00
Julian Herrero
46030c72e8
remove unnecessary parameter
2018-09-21 20:53:20 +02:00
Julian Herrero
673ec075eb
Make answers translatable
2018-09-20 17:13:40 +02:00
Julian Herrero
5e6248d2ac
Make questions translatable
2018-09-20 17:11:53 +02:00
Bertocq
4fb9f6829c
Extract inline query to an OfficerAssignment scope
2018-02-19 11:09:19 +01:00
Raimond Garcia
9e12d67f3f
Merge pull request #2114 from wairbut-m2c/iagirre-booth-assignment-removal
...
Iagirre booth assignment removal
2017-11-28 19:59:20 +01:00
Bertocq
db54273dad
Replace == 0 comparisions for .zero?
2017-11-13 02:27:38 +01:00
Bertocq
cd66ba5d54
Rubocop autocorrections
2017-11-13 02:22:00 +01:00
iagirre
1077e25b2b
Shifts are destroyed when a booths is unassigned. An alert appears if there are shifts, but it doesn't if there aren't.
2017-10-30 12:36:07 +01:00
iagirre
89425f50ef
First steps to destroy shifts when booth_assignments are destroyed
2017-10-27 14:57:32 +02:00
Bertocq
f9458b9ef0
Show booth associated to current/recounting/incoming polls on shift management admin panel
2017-10-23 19:09:57 +02:00
María Checa
5a9ee4642e
Merge branch 'master' into 1786-poll_results
2017-10-23 13:43:58 +02:00
María Checa
e85c98f4b4
Improved results and stats percentages
2017-10-20 17:18:54 +02:00
María Checa
9bbf0b1ef9
Improved most_voted method
2017-10-20 16:48:54 +02:00
Bertocq
7507f43ea8
Add helper method on Booth model to get booth assigment for a given poll
2017-10-19 21:30:31 +02:00
María Checa
f029cc2016
Cached Poll stats methods
2017-10-19 12:17:33 +02:00
María Checa
6e680c187f
Added new column most_voted to Poll::Question::Answers
2017-10-19 12:17:20 +02:00
María Checa
35f24b519d
Merge branch 'master' into 1786-poll_results
2017-10-18 17:33:16 +02:00
Alberto García
91b8ed67f6
Merge pull request #2075 from wairbut-m2c/iagirre-poll-stats
...
Iagirre poll stats
2017-10-18 17:25:02 +02:00
iagirre
f7bb3ec8b7
Merge remote-tracking branch 'consul/master' into iagirre-poll-stats
2017-10-18 09:48:02 +02:00
Bertocq
08823153a9
Correct answer inclusion validation for no question scenario
2017-10-18 02:03:58 +02:00
Bertocq
8d2945e8a2
Fix answer attribute validation to check question's question_answers inclusion
2017-10-18 01:31:34 +02:00
Bertocq
0a5ee3f861
Remove valid_answers usage on Poll Question model
2017-10-18 01:30:21 +02:00
Bertocq
ce0a7f6fad
Rubocop autocorrections
2017-10-17 22:00:00 +02:00
María Checa
610aea2c72
Added new methods to Poll question and Poll answers
2017-10-17 18:30:20 +02:00
iagirre
0f73b787b2
Fixed views and Poll::Stats model to pass the specs
2017-10-17 16:07:44 +02:00
iagirre
6a292daf42
Partial to render the polls stats and model methods to get the information from DB
2017-10-17 15:04:29 +02:00
BertoCQ
d1c67212b0
Merge pull request #1964 from consul/chore/remove_results
...
Remove deprecated Poll results models
2017-10-17 14:39:42 +02:00
Bertocq
0b5eed090e
Fix no-answer scenario for question valid answers
2017-10-16 19:54:07 +02:00
iagirre
78cc09cc5a
Controllers and models to see the polls stats. Routes related also added.
2017-10-16 17:25:04 +02:00
Bertocq
34c278db74
Small fixes for Poll Question Answer ordering
2017-10-11 12:05:20 +02:00
iagirre
644d09ebd2
PR comments applied and poll_question_answer default name changed in factory.
2017-10-11 09:42:52 +02:00
iagirre
943c1f23af
Spects added to test the order of answers. Default order for question_answers set.
2017-10-10 16:38:55 +02:00
iagirre
2b10b59e2a
Order in the admin page using jquery-ui sortable widget.
2017-10-10 16:38:29 +02:00
Bertocq
9a396fe634
Fix record_voter_participation and usage on specs
2017-10-07 10:48:24 +02:00
BertoCQ
6a0197a61b
Merge branch 'master' into feature/1985#voting_token
2017-10-07 10:46:13 +02:00
María Checa
bcfd1a844a
Poll voter token
2017-10-06 20:44:47 +02:00
Bertocq
165509b525
Switch from Poll::Answer to Poll::Voter usage and small fixes
2017-10-06 18:59:47 +02:00
María Checa
35148015b9
Added token to poll voters
2017-10-06 18:43:00 +02:00
decabeza
dd69401477
Merge branch 'master' into question-answer-documents
2017-10-06 15:18:42 +02:00
Bertocq
1806bd3df4
Add token string attribute to Poll Answer
2017-10-06 14:28:57 +02:00
Raimond Garcia
108d4104e8
Merge pull request #1986 from wairbut-m2c/iagirre-remove-documents-questions
...
Iagirre remove documents questions
2017-10-06 14:07:21 +02:00
decabeza
de9b599578
Merge branch 'master' into question-answer-documents
2017-10-06 13:55:49 +02:00
María Checa
6192ea8b78
Added documents to Poll::Question::Answer
2017-10-06 01:17:23 +02:00