Commit Graph

33 Commits

Author SHA1 Message Date
Javi Martín
f9ed186909 Add rubocop spacing rules
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
lalo
7c9c50f4c6 Add Model changes to work with votation_types 2019-06-12 19:32:41 +02:00
Julian Herrero
8e0bbf54f6 Replace harcoded images and documents settings 2019-06-04 11:50:09 +02:00
Bertocq
b8dbdaf9a7 Move question most voted answer from boolean to a enumerable max by total_votes 2019-05-21 13:26:44 +02:00
Bertocq
f4260788eb Add Partial Results counts to question answers 2019-05-21 13:26:44 +02:00
decabeza
cb22e6cbfb Merge branch 'master' into proposal-dashboard 2019-04-23 17:12:47 +02:00
Angel Perez
01c1ac2b10 Replace all occurrences of ActiveRecord::Base with ApplicationRecord 2019-04-17 17:40:56 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Senén Rodero Rodríguez
c73aae9663 Remove before validation callback
This was breaking nested poll_questions_answers when submitting
more than one new answer at a time.
2019-03-21 14:51:17 +01:00
Julian Herrero
3ba961a2d7 Use double quotes in models 2019-03-14 17:25:43 +01:00
Juanjo Bazán
4cccb93677 fix poll accuracy results using floats 2018-11-11 14:54:35 +01: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
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
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
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
María Checa
6e680c187f Added new column most_voted to Poll::Question::Answers 2017-10-19 12:17:20 +02:00
María Checa
610aea2c72 Added new methods to Poll question and Poll answers 2017-10-17 18:30:20 +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
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
Raimond Garcia
c72f95c72b Merge branch 'master' into aperez-admin-question-videos 2017-10-06 01:12:22 +02:00
rgarcia
1cf9bc4ad1 adds images to anwers 2017-10-04 23:56:09 +02:00
Angel Perez
32f3b643b0 Create 'poll_question_answer_videos' table and model 2017-10-04 17:25:51 -04:00
rgarcia
4aaf681d2d uses new answer model in user facing interface 2017-10-04 17:45:51 +02:00
rgarcia
461410a79d adds consistency to answer's namespace 2017-10-04 17:06:29 +02:00