Module: Decidim::Surveys::SurveyHelper
- Included in:
- SurveysController
- Defined in:
- decidim-surveys/app/helpers/decidim/surveys/survey_helper.rb
Instance Method Summary collapse
- #authorization_action ⇒ Object
- #authorizations ⇒ Object
- #authorize_action_path(handler_name) ⇒ Object
- #current_component ⇒ Object
- #no_permission ⇒ Object
- #resource ⇒ Object
Instance Method Details
#authorization_action ⇒ Object
18 19 20 |
# File 'decidim-surveys/app/helpers/decidim/surveys/survey_helper.rb', line 18 def @authorization_action ||= params[:authorization_action] end |
#authorizations ⇒ Object
26 27 28 |
# File 'decidim-surveys/app/helpers/decidim/surveys/survey_helper.rb', line 26 def @authorizations ||= (:answer, resource: questionnaire_for) end |
#authorize_action_path(handler_name) ⇒ Object
22 23 24 |
# File 'decidim-surveys/app/helpers/decidim/surveys/survey_helper.rb', line 22 def (handler_name) .status_for(handler_name).current_path end |
#current_component ⇒ Object
14 15 16 |
# File 'decidim-surveys/app/helpers/decidim/surveys/survey_helper.rb', line 14 def current_component @current_component ||= Decidim::Component.find(params[:component_id]) end |
#no_permission ⇒ Object
6 7 8 |
# File 'decidim-surveys/app/helpers/decidim/surveys/survey_helper.rb', line 6 def cell "decidim/authorization_modal", end |
#resource ⇒ Object
10 11 12 |
# File 'decidim-surveys/app/helpers/decidim/surveys/survey_helper.rb', line 10 def resource questionnaire_for end |