Class: Decidim::ActionDelegator::Admin::InviteParticipantsController
- Inherits:
-
ApplicationController
- Object
- Decidim::Admin::ApplicationController
- ApplicationController
- Decidim::ActionDelegator::Admin::InviteParticipantsController
- Includes:
- NeedsPermission
- Defined in:
- app/controllers/decidim/action_delegator/admin/invite_participants_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#invite_all_users ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'app/controllers/decidim/action_delegator/admin/invite_participants_controller.rb', line 24 def invite_all_users :invite, :participant, resource: current_setting InviteParticipantsJob.perform_later(current_setting, current_organization) notice = t("invite_all_users.success", scope: "decidim.action_delegator.admin.invite_participants") redirect_to decidim_admin_action_delegator.setting_participants_path(current_setting), notice: notice end |
#invite_user ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'app/controllers/decidim/action_delegator/admin/invite_participants_controller.rb', line 13 def invite_user :invite, :participant, resource: current_setting Decidim::InviteUser.call(form) do on(:ok) do notice = t("invite_user.success", scope: "decidim.action_delegator.admin.invite_participants") redirect_to decidim_admin_action_delegator.setting_participants_path(current_setting), notice: notice end end end |
#resend_invitation ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/decidim/action_delegator/admin/invite_participants_controller.rb', line 33 def resend_invitation :invite, :participant, resource: current_setting Decidim::InviteUserAgain.call(participant.user, "invitation_instructions") do on(:ok) do flash[:notice] = I18n.t("users.resend_invitation.success", scope: "decidim.admin") end redirect_to setting_participants_path(current_setting) end end |