Module: Decidim::Forms::Admin::Concerns::HasQuestionnaireResponsesUrlHelper
- Included in:
- Surveys::Admin::PublishResponsesController, Surveys::Admin::Questions::SurveysController
- Defined in:
- decidim-forms/app/helpers/decidim/forms/admin/concerns/has_questionnaire_responses_url_helper.rb
Overview
Url helper for HasQuestionnaireResponses controller concern
Class Method Summary collapse
Instance Method Summary collapse
- #questionnaire_export_response_url(id) ⇒ Object
-
#questionnaire_participant_responses_url(id) ⇒ Object
You can implement this method in your controller to change the URL where the user’s questionnaire responses will be shown.
-
#questionnaire_participants_url ⇒ Object
You can implement this method in your controller to change the URL where the questionnaire participants’ info will be shown.
-
#questionnaire_url ⇒ Object
You can implement this method in your controller to change the URL where the questionnaire can be edited.
Class Method Details
.included(base) ⇒ Object
10 11 12 13 |
# File 'decidim-forms/app/helpers/decidim/forms/admin/concerns/has_questionnaire_responses_url_helper.rb', line 10 def self.included(base) base.helper_method :questionnaire_url, :questionnaire_participants_url, :questionnaire_participant_responses_url, :questionnaire_export_response_url end |
Instance Method Details
#questionnaire_export_response_url(id) ⇒ Object
33 34 35 |
# File 'decidim-forms/app/helpers/decidim/forms/admin/concerns/has_questionnaire_responses_url_helper.rb', line 33 def questionnaire_export_response_url(id) url_for([questionnaire.questionnaire_for, { id:, format: "pdf" }]) end |
#questionnaire_participant_responses_url(id) ⇒ Object
You can implement this method in your controller to change the URL where the user’s questionnaire responses will be shown.
29 30 31 |
# File 'decidim-forms/app/helpers/decidim/forms/admin/concerns/has_questionnaire_responses_url_helper.rb', line 29 def questionnaire_participant_responses_url(id) url_for([questionnaire.questionnaire_for, { id: }]) end |
#questionnaire_participants_url ⇒ Object
You can implement this method in your controller to change the URL where the questionnaire participants’ info will be shown.
23 24 25 |
# File 'decidim-forms/app/helpers/decidim/forms/admin/concerns/has_questionnaire_responses_url_helper.rb', line 23 def questionnaire_participants_url url_for([questionnaire.questionnaire_for, { format: nil }]) end |
#questionnaire_url ⇒ Object
You can implement this method in your controller to change the URL where the questionnaire can be edited.
17 18 19 |
# File 'decidim-forms/app/helpers/decidim/forms/admin/concerns/has_questionnaire_responses_url_helper.rb', line 17 def questionnaire_url url_for(questionnaire.questionnaire_for) end |