Commit Graph

6 Commits

Author SHA1 Message Date
Javi Martín
1d955b7a20 Simplify using helper methods in components
The `use_helpers` method was added in ViewComponent 3.8.0, and it's
included by default in all components since version 3.11.0.

Note we sometimes delegated the `can?` method to the controller instead
of the helpers, for no particularly reason. We're unifying that code as
well.
2024-03-02 17:34:25 +01:00
decabeza
36e452437e Add questions with mutiple answers to polls public interface
The `reload` method added to max_votes validation is needed because the
author gets here with some changes because of the around_action
`switch_locale`, which adds some changes to the current user record and
therefore, the lock method raises an exception when trying to lock it
requiring us to save or discard those record changes.
2022-10-18 11:04:40 +02:00
Senén Rodero Rodríguez
7df0e9a961 Allow to remove poll answers 2022-10-18 11:04:40 +02:00
Senén Rodero Rodríguez
f90d0d9c4d Show poll user answers in subsequent sessions 2022-10-18 10:39:00 +02:00
Senén Rodero Rodríguez
0ec4d52ed1 Simplify Polls::Questions::AnswersComponent view 2022-10-18 10:38:07 +02:00
Senén Rodero Rodríguez
bd58023a8a Extract polls questions answers partial into a component 2022-10-17 18:03:36 +02:00