Class: Decidim::Meetings::Admin::MeetingCopiesController
- Inherits:
-
ApplicationController
- Object
- Admin::Components::BaseController
- ApplicationController
- Decidim::Meetings::Admin::MeetingCopiesController
- Defined in:
- app/controllers/decidim/meetings/admin/meeting_copies_controller.rb
Overview
Controller that allows managing meetings.
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/decidim/meetings/admin/meeting_copies_controller.rb', line 17 def create :copy, :meeting, meeting: meeting @form = form(MeetingCopyForm).from_params(params, current_component: current_component) CopyMeeting.call(@form, meeting) do on(:ok) do flash[:notice] = I18n.t("meeting_copies.create.success", scope: "decidim.admin") redirect_to meetings_path end on(:invalid) do flash.now[:alert] = I18n.t("meeting_copies.create.error", scope: "decidim.admin") render :new end end end |
#new ⇒ Object
11 12 13 14 15 |
# File 'app/controllers/decidim/meetings/admin/meeting_copies_controller.rb', line 11 def new :copy, :meeting, meeting: meeting @form = form(MeetingCopyForm).from_model(meeting) end |