Class: Decidim::Surveys::Admin::SurveysController
- Inherits:
-
ApplicationController
- Object
- Admin::Components::BaseController
- ApplicationController
- Decidim::Surveys::Admin::SurveysController
- Includes:
- Forms::Admin::Concerns::HasQuestionnaire, Forms::Admin::Concerns::HasQuestionnaireAnswers
- Defined in:
- app/controllers/decidim/surveys/admin/surveys_controller.rb
Overview
This controller allows the user to update a Page.
Instance Method Summary collapse
- #edit_questionnaire_title ⇒ Object
-
#public_url ⇒ Object
Specify the public url from which the survey can be viewed and answered.
- #questionnaire_for ⇒ Object
-
#questionnaire_participant_answers_url(session_token) ⇒ Object
Specify where to redirect after exporting a user response.
Instance Method Details
#edit_questionnaire_title ⇒ Object
25 26 27 |
# File 'app/controllers/decidim/surveys/admin/surveys_controller.rb', line 25 def edit_questionnaire_title t(:title, scope: "decidim.forms.admin.questionnaires.form", questionnaire_for: translated_attribute(current_component.name)) end |
#public_url ⇒ Object
Specify the public url from which the survey can be viewed and answered
16 17 18 |
# File 'app/controllers/decidim/surveys/admin/surveys_controller.rb', line 16 def public_url Decidim::EngineRouter.main_proxy(current_component).survey_path(survey) end |
#questionnaire_for ⇒ Object
11 12 13 |
# File 'app/controllers/decidim/surveys/admin/surveys_controller.rb', line 11 def questionnaire_for survey end |
#questionnaire_participant_answers_url(session_token) ⇒ Object
Specify where to redirect after exporting a user response
21 22 23 |
# File 'app/controllers/decidim/surveys/admin/surveys_controller.rb', line 21 def questionnaire_participant_answers_url(session_token) Decidim::EngineRouter.admin_proxy(survey.component).show_survey_path(session_token: session_token) end |