Class: Goldberg::PermissionsController
Instance Method Summary
collapse
Methods included from Controller
included
#copy, #six_local_auto_login
#active_scaffold_render_secure_download, #assign_names_with_active_scaffold, #render_with_active_scaffold, #search_generic_view_paths?
Instance Method Details
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb', line 28
def create
@permission = Permission.new(params[:permission])
if @permission.save
flash[:notice] = 'Permission was successfully created.'
Role.rebuild_cache
redirect_to :action => 'list'
else
render :action => 'new'
end
end
|
54
55
56
57
58
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb', line 54
def destroy
Permission.find(params[:id]).destroy
Role.rebuild_cache
redirect_to :action => 'list'
end
|
39
40
41
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb', line 39
def edit
@permission = Permission.find(params[:id])
end
|
9
10
11
12
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb', line 9
def index
list
render :action => 'list'
end
|
14
15
16
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb', line 14
def list
@permissions = Permission.find(:all, :order => 'name')
end
|
24
25
26
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb', line 24
def new
@permission = Permission.new
end
|
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/six-updater-web/vendor/plugins/goldberg/app/controllers/goldberg/permissions_controller.rb', line 43
def update
@permission = Permission.find(params[:id])
if @permission.update_attributes(params[:permission])
flash[:notice] = 'Permission was successfully updated.'
Role.rebuild_cache
redirect_to :action => 'show', :id => @permission
else
render :action => 'edit'
end
end
|