Class: Decidim::Admin::RemindersController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::Admin::RemindersController
- Includes:
- ComponentPathHelper
- Defined in:
- decidim-admin/app/controllers/decidim/admin/reminders_controller.rb
Direct Known Subclasses
Decidim::Assemblies::Admin::RemindersController, Conferences::Admin::RemindersController, ParticipatoryProcesses::Admin::RemindersController, Votings::Admin::RemindersController
Instance Method Summary collapse
Methods included from ComponentPathHelper
#can_be_managed?, #main_component_path, #main_component_url, #manage_component_path
Methods inherited from ApplicationController
#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path
Methods included from Headers::HttpCachingDisabler
Methods included from NeedsSnippets
Methods included from RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'decidim-admin/app/controllers/decidim/admin/reminders_controller.rb', line 17 def create :create, :reminder @form = reminder_form_from_params(params) command_class.call(@form) do on(:ok) do |reminders_queued| flash[:notice] = t("decidim.admin.reminders.create.success", count: reminders_queued) redirect_to manage_component_path(current_component) end on(:invalid) do flash.now[:alert] = t("decidim.admin.reminders.create.error") render :new end end end |
#new ⇒ Object
10 11 12 13 14 15 |
# File 'decidim-admin/app/controllers/decidim/admin/reminders_controller.rb', line 10 def new :create, :reminder @form = reminder_form_from_params(name: reminder_manifest.name) render :new end |