Module: Decidim::Forms::Admin::Concerns::HasQuestionnaireAnswers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/controllers/decidim/forms/admin/concerns/has_questionnaire_answers.rb
Overview
Questionnaires can be related to any class in Decidim. In order to manage the questionnaires answers for a given type, you should create a new controller and include the HasQuestionnaire concern as well as this one.
In the controller that includes this concern, you should define a ‘questionnaire_for` method that returns an instance of the model that the questionnaire belongs to. You should also define the routes for: `index_<model>_url` and `export_<model>_url` as well as `show_<model>_url` and `export_response_<model>_url` (which are passed a `:session_token` parameter)