Class: GroupPermissionsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/group_permissions_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
# File 'app/controllers/group_permissions_controller.rb', line 7

def index
  @groups = Group.sorted
end

#showObject



11
12
13
# File 'app/controllers/group_permissions_controller.rb', line 11

def show
  @gps = GroupPermissionsSetup.new(group: @group)
end

#updateObject



15
16
17
18
19
20
21
22
# File 'app/controllers/group_permissions_controller.rb', line 15

def update
  @gps = GroupPermissionsSetup.new(gps_params)
  if @gps.save
    redirect_to group_permission_path(@group), notice: t(:notice_successful_update)
  else
    render :show
  end
end