Commit Graph

12 Commits

Author SHA1 Message Date
Javi Martín
27ed26d6f2 Remove unnecessary class names in relations
Just like we do in the Budget module, and in some places in the Poll and
Legislation modules, we don't need to specify the class name when the
name of the relation matches the name of a class in the same module.
2019-10-25 19:03:14 +02:00
Juanjo Bazán
7ab602175a makes models inherit from ApplicationRecord 2019-04-17 17:40:56 +02:00
Julian Herrero
3ba961a2d7 Use double quotes in models 2019-03-14 17:25:43 +01:00
Javi Martín
5e8746f026 Remove question option uniqueness validation
Having translations makes this validation too complex and not worth the
effort, since now we can't just scope in a single column but we need to
scope in the translations locale and the question ID.
2018-10-22 16:36:18 +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
85701bd754 Update legislation questions translatable fields 2018-10-22 15:46:24 +02:00
Javi Martín
3fb98b1752 Fix typos 2018-09-19 14:54:52 +02:00
Marko Lovic
06347062dd Make Legislation Questions translatable 2018-09-19 14:54:24 +02:00
Amaia Castro
5e01b380cd Legislation Answer model 2016-12-27 18:21:50 +01:00
Amaia Castro
55eb03531c Comments in legislation question page 2016-12-23 09:35:02 +01:00
Amaia Castro
d25d6c178c Legislation Questions model and basic admin 2016-12-20 18:52:43 +01:00