Class: Decidim::Initiatives::Admin::CommitteeRequestsController
- Inherits:
-
ApplicationController
- Object
- Admin::ApplicationController
- ApplicationController
- Decidim::Initiatives::Admin::CommitteeRequestsController
- Includes:
- InitiativeAdmin
- Defined in:
- app/controllers/decidim/initiatives/admin/committee_requests_controller.rb
Overview
Controller in charge of managing committee membership
Instance Method Summary collapse
-
#approve ⇒ Object
GET /initiatives/:initiative_id/committee_requests/:id/approve.
-
#index ⇒ Object
GET /admin/initiatives/:initiative_id/committee_requests.
-
#revoke ⇒ Object
DELETE /initiatives/:initiative_id/committee_requests/:id/revoke.
Methods included from InitiativeSlug
Methods inherited from ApplicationController
#permission_class_chain, #permissions_context
Instance Method Details
#approve ⇒ Object
GET /initiatives/:initiative_id/committee_requests/:id/approve
18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/controllers/decidim/initiatives/admin/committee_requests_controller.rb', line 18 def approve :approve, :initiative_committee_member, request: membership_request ApproveMembershipRequest.call(membership_request) do on(:ok) do redirect_to edit_initiative_path(current_initiative), flash: { notice: I18n.t("success", scope: "decidim.initiatives.committee_requests.approve") } end end end |
#index ⇒ Object
GET /admin/initiatives/:initiative_id/committee_requests
13 14 15 |
# File 'app/controllers/decidim/initiatives/admin/committee_requests_controller.rb', line 13 def index :index, :initiative_committee_member end |
#revoke ⇒ Object
DELETE /initiatives/:initiative_id/committee_requests/:id/revoke
31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/controllers/decidim/initiatives/admin/committee_requests_controller.rb', line 31 def revoke :revoke, :initiative_committee_member, request: membership_request RevokeMembershipRequest.call(membership_request) do on(:ok) do redirect_to edit_initiative_path(current_initiative), flash: { notice: I18n.t("success", scope: "decidim.initiatives.committee_requests.revoke") } end end end |