Class: Decidim::Demographics::Admin::QuestionsController
Instance Method Summary
collapse
included, #questionnaire_export_response_url, #questionnaire_participant_responses_url, #questionnaire_url
#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path
#disable_http_caching
#attachment?, #default_locale?
#snippets
register_permissions
enhance_controller, extended, included
Instance Method Details
#after_update_url ⇒ Object
12
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 12
def after_update_url = edit_questions_questions_path
|
#edit_questionnaire_title ⇒ Object
29
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 29
def edit_questionnaire_title = t(:title, scope: "decidim.demographics.admin.questions.edit")
|
#edit_questions_template ⇒ Object
10
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 10
def edit_questions_template = "decidim/demographics/admin/questions/edit"
|
#questionnaire ⇒ Object
20
21
22
23
24
25
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 20
def questionnaire
@questionnaire ||= Decidim::Forms::Questionnaire.where(questionnaire_for:).first_or_initialize
@questionnaire.override_edit!
Decidim::Demographics.create_default_questionnaire!(@questionnaire)
@questionnaire
end
|
#questionnaire_for ⇒ Object
27
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 27
def questionnaire_for = demographic
|
#questionnaire_participants_url ⇒ Object
14
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 14
def questionnaire_participants_url = decidim_admin_demographics.responses_path
|
#response_options_url(_params) ⇒ Object
18
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 18
def response_options_url(_params) = decidim_admin_demographics.responses_path
|
#update_url ⇒ Object
16
|
# File 'decidim-demographics/app/controllers/decidim/demographics/admin/questions_controller.rb', line 16
def update_url = update_questions_questions_path
|