Class: GroupPermissionsController

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

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
# File 'app/controllers/group_permissions_controller.rb', line 5

def index
  @groups = Group.sorted
end

#showObject



9
10
11
# File 'app/controllers/group_permissions_controller.rb', line 9

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

#updateObject



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

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