Javi Martín
9fe8c47528
Apply Rails/SafeNavigation rubocop rule
2019-09-10 21:43:39 +02:00
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
Javier Martín
d57025696f
Merge pull request #3503 from consul/backport-blank_votes
...
Improve poll stats
2019-05-21 14:23:13 +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
e026412389
Add button to delete a poll
2019-05-14 16:46:56 +02:00
decabeza
cb22e6cbfb
Merge branch 'master' into proposal-dashboard
2019-04-23 17:12:47 +02:00
Juanjo Bazán
7ab602175a
makes models inherit from ApplicationRecord
2019-04-17 17:40:56 +02:00
decabeza
eda6ea7f12
Merge branch 'master' into dashboard
2019-03-26 16:45:48 +01:00
Julian Herrero
3ba961a2d7
Use double quotes in models
2019-03-14 17:25:43 +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
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
decabeza
546105d989
Merge branch 'master' into dashboard-master
2018-10-19 01:48:37 +02:00
Julian Herrero
5e6248d2ac
Make questions translatable
2018-09-20 17:11:53 +02:00
Juan Salvador Pérez García
50f73abb0c
Fixes #voodoorai2000 comments
...
Fixes some comments from #voodoorai2000 for the PR to consul
2018-07-27 16:30:03 +02:00
Juan Salvador Pérez García
2be107f4da
Specs
...
Added specs and fixed some issues found after executing them
2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
2ce9f95283
Polls in the dashboard
...
A reduced version of polls has been added to the dashboard
2018-07-17 17:57:30 +02:00
María Checa
35f24b519d
Merge branch 'master' into 1786-poll_results
2017-10-18 17:33:16 +02:00
Bertocq
0a5ee3f861
Remove valid_answers usage on Poll Question model
2017-10-18 01:30:21 +02:00
María Checa
610aea2c72
Added new methods to Poll question and Poll answers
2017-10-17 18:30:20 +02:00
Bertocq
0b5eed090e
Fix no-answer scenario for question valid answers
2017-10-16 19:54:07 +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
5b129b933f
Removed documents from questions (documentable from model and uploader from _form in views)
2017-10-05 13:38:19 +02: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
Raimond Garcia
44d0c04e38
Merge branch 'master' into aperez-admin-questions-section
2017-10-04 14:13:20 +02:00
Angel Perez
1d1b861ddf
Create 'poll_question_answers' table
2017-10-03 23:04:50 -04:00
María Checa
348e4e54f3
Removed question description
2017-10-03 19:11:54 +02:00
Angel Perez
0611e0f4ea
Validate presence of 'poll_id' attribute on Poll::Question model
...
Fixes #1831
On branch aperez-validate-poll-question-is-selected
Changes to be committed:
modified: app/models/poll/question.rb
modified: spec/models/poll/question_spec.rb
modified: spec/features/admin/poll/polls_spec.rb
2017-09-14 11:52:19 -04:00
María Checa
4af44a45a1
Documents upload for questions working
2017-09-06 12:00:46 +02:00
Bertocq
beb4bc119c
Fix Rails/Delegate rubocop issue
2017-07-10 23:02:27 +02:00
Bertocq
2888c20489
Fix all Style/RedundantSelf rubocop issues
2017-07-05 11:55:52 +02:00
Bertocq
c9bc028524
Remove all unnecesary extra spacing and Layout/ExtraSpacing list from rubocop file
2017-06-28 14:12:51 +02:00
Juanjo Bazán
db9ee74828
removes max restriction on title length
2017-02-12 13:08:26 +01:00
kikito
043e2e3586
Removes summary from poll::Question model
2017-01-30 18:41:24 +01:00
kikito
499f9b51e2
makes it possible to create orphan poll questions
2017-01-25 11:19:18 +01:00
kikito
2be88cb316
Adds missing validation to poll::question. Fixes specs
2017-01-25 10:46:57 +01:00
kikito
d024505960
moves geozones from poll question to poll in models
2017-01-20 18:58:03 +01:00
Juanjo Bazán
f0156c5b5a
adds admin search/add/remove question to poll
2016-12-26 16:19:35 +01:00
rgarcia
20cb044015
adds search and filter for poll questions
2016-11-29 11:46:30 +01:00
rgarcia
ceebae644f
removes question column from poll_questions
2016-11-22 11:41:10 +01:00
rgarcia
5f6d0590e8
tmp commit refactoring answerable questions
2016-11-18 03:57:31 +01:00
rgarcia
4955daf886
adds poll and poll question's specs
2016-11-17 22:48:00 +01:00
rgarcia
626a8e9154
updates specs for admin poll questions
2016-11-17 21:31:51 +01:00
rgarcia
348a6dc970
everybody can vote for now
2016-11-16 19:42:05 +01:00
kikito
598b1b9c01
Adds group by to answerable_by scope to avoid duplicates
2016-11-14 13:35:23 +01:00
kikito
38efad77f3
Changes the way question#copy_attributes_from_proposal works
2016-11-11 19:11:53 +01:00