Class: Decidim::Conferences::ConferenceRegistrationsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- ApplicationController
- Decidim::Conferences::ConferenceRegistrationsController
- Defined in:
- decidim-conferences/app/controllers/decidim/conferences/conference_registrations_controller.rb
Overview
Exposes the registration resource so users can join and leave conferences.
Constant Summary
Constants included from RedesignLayout
RedesignLayout::FALLBACK_LAYOUT
Instance Method Summary collapse
Methods included from UserBlockedChecker
#check_user_block_status, #check_user_not_blocked
Methods included from NeedsSnippets
Methods included from HttpCachingDisabler
Methods included from HasStoredPath
#skip_store_location?, #store_current_location
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'decidim-conferences/app/controllers/decidim/conferences/conference_registrations_controller.rb', line 9 def create :join, :conference, conference: conference JoinConference.call(conference, registration_type, current_user) do on(:ok) do flash[:notice] = I18n.t("conference_registrations.create.success", scope: "decidim.conferences") redirect_after_path end on(:invalid) do flash.now[:alert] = I18n.t("conference_registrations.create.invalid", scope: "decidim.conferences") redirect_after_path end end end |
#decline_invitation ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'decidim-conferences/app/controllers/decidim/conferences/conference_registrations_controller.rb', line 41 def decline_invitation :decline_invitation, :conference, conference: conference DeclineInvitation.call(conference, current_user) do on(:ok) do flash[:notice] = I18n.t("conference_registrations.decline_invitation.success", scope: "decidim.conferences") redirect_after_path end on(:invalid) do flash.now[:alert] = I18n.t("conference_registrations.decline_invitation.invalid", scope: "decidim.conferences") redirect_after_path end end end |
#destroy ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'decidim-conferences/app/controllers/decidim/conferences/conference_registrations_controller.rb', line 25 def destroy :leave, :conference, conference: conference LeaveConference.call(conference, registration_type, current_user) do on(:ok) do flash[:notice] = I18n.t("conference_registrations.destroy.success", scope: "decidim.conferences") redirect_after_path end on(:invalid) do flash.now[:alert] = I18n.t("conference_registrations.destroy.invalid", scope: "decidim.conferences") redirect_after_path end end end |