Class: Decidim::GroupAdminsController
- Inherits:
-
ApplicationController
- Object
- DecidimController
- ApplicationController
- Decidim::GroupAdminsController
- Includes:
- FormFactory, UserGroups
- Defined in:
- app/controllers/decidim/group_admins_controller.rb
Overview
The controller to manage user groups admins
Instance Method Summary collapse
Methods included from UserGroups
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 RegistersPermissions
Methods included from NeedsOrganization
enhance_controller, extended, included
Instance Method Details
#demote ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/controllers/decidim/group_admins_controller.rb', line 17 def demote :manage, :user_group, user_group: user_group DemoteMembership.call(membership, user_group) do on(:ok) do flash[:notice] = t("group_admins.demote.success", scope: "decidim") redirect_back fallback_location: group_manage_users_path(user_group.nickname) end on(:invalid) do flash[:alert] = t("group_admins.demote.error", scope: "decidim") redirect_back fallback_location: group_manage_users_path(user_group.nickname) end end end |
#index ⇒ Object
13 14 15 |
# File 'app/controllers/decidim/group_admins_controller.rb', line 13 def index :manage, :user_group, user_group: user_group end |