Class: Decidim::Meetings::Polls::AnswersController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Components::BaseController
- ApplicationController
- Decidim::Meetings::Polls::AnswersController
- Includes:
- FormFactory, Decidim::Meetings::PollsResources
- Defined in:
- decidim-meetings/app/controllers/decidim/meetings/polls/answers_controller.rb
Instance Method Summary collapse
Methods inherited from Components::BaseController
#current_component, #current_manifest, #current_participatory_space, #permission_class_chain, #permission_scope, #redirect_unless_feature_private, #set_component_breadcrumb_item, #share_token
Methods included from RegistersPermissions
Methods included from UserBlockedChecker
#check_user_block_status, #check_user_not_blocked
Methods included from NeedsSnippets
Methods included from Headers::HttpCachingDisabler
Methods included from HasStoredPath
#skip_store_location?, #store_current_location
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#create ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'decidim-meetings/app/controllers/decidim/meetings/polls/answers_controller.rb', line 12 def create (:create, :answer, question:) @form = form(AnswerForm).from_params(params, question:, current_user:) CreateAnswer.call(@form, current_user, questionnaire) do # Both :ok and :invalid render the same template, because # validation errors are displayed in the template respond_to do |format| format.js end end end |