Class: Decidim::Surveys::SurveysController
- Inherits:
-
ApplicationController
- Object
- Components::BaseController
- ApplicationController
- Decidim::Surveys::SurveysController
- Includes:
- ComponentPathHelper, Forms::Concerns::HasQuestionnaire, SurveyHelper
- Defined in:
- app/controllers/decidim/surveys/surveys_controller.rb
Overview
Exposes the survey resource so users can view and answer them.
Instance Method Summary collapse
Methods included from SurveyHelper
#authorization_action, #authorizations, #authorize_action_path, #current_component, #no_permission, #resource
Instance Method Details
#check_permissions ⇒ Object
17 18 19 |
# File 'app/controllers/decidim/surveys/surveys_controller.rb', line 17 def render :no_permission unless (:answer, resource: survey).ok? end |
#questionnaire_for ⇒ Object
21 22 23 |
# File 'app/controllers/decidim/surveys/surveys_controller.rb', line 21 def questionnaire_for survey end |