authorization with cancancan
This commit is contained in:
parent
4af0e59ca6
commit
c3ed57e3e9
34 changed files with 538 additions and 500 deletions
|
|
@ -1,14 +1,17 @@
|
|||
class Admin::EmailsController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
module Admin
|
||||
class EmailsController < ApplicationController
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource :emails, class: EmailSettings
|
||||
|
||||
def update
|
||||
@conference.email_settings.update_attributes(params[:email_settings])
|
||||
redirect_to(admin_conference_emails_path(
|
||||
@conference.short_title),
|
||||
notice: 'Settings have been successfully updated.')
|
||||
end
|
||||
def update
|
||||
@conference.email_settings.update_attributes(params[:email_settings])
|
||||
redirect_to(admin_conference_emails_path(
|
||||
@conference.short_title),
|
||||
notice: 'Settings have been successfully updated.')
|
||||
end
|
||||
|
||||
def index
|
||||
@settings = @conference.email_settings
|
||||
def index
|
||||
@settings = @conference.email_settings
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue