work on authorization in controllers and refine ability.rb
This commit is contained in:
parent
2d3a1ef37e
commit
0684dbad19
5 changed files with 23 additions and 39 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class ConferenceRegistrationController < ApplicationController
|
||||
before_filter :verify_user
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
authorize_resource :conference_registration, class: Registration
|
||||
load_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource :conference_registration, class: Registration
|
||||
|
||||
def register
|
||||
@workshops = @conference.events.where('require_registration = ? AND state LIKE ?',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue