authorization with cancancan
This commit is contained in:
parent
4af0e59ca6
commit
c3ed57e3e9
34 changed files with 538 additions and 500 deletions
|
|
@ -1,12 +1,13 @@
|
|||
class Admin::SupporterLevelsController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
module Admin
|
||||
class Admin::SupporterLevelsController < ApplicationController
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
authorize_resource :supporter_level, through: :conference
|
||||
|
||||
def show
|
||||
render :supporter_levels
|
||||
end
|
||||
def show
|
||||
render :supporter_levels
|
||||
end
|
||||
|
||||
def update
|
||||
begin
|
||||
def update
|
||||
@conference.update_attributes!(params[:conference])
|
||||
redirect_to(admin_conference_supporter_levels_path(conference_id: @conference.short_title), notice: 'Supporter levels were successfully updated.')
|
||||
rescue => e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue