authorization with cancancan
This commit is contained in:
parent
4af0e59ca6
commit
c3ed57e3e9
34 changed files with 538 additions and 500 deletions
|
|
@ -1,11 +1,12 @@
|
|||
class ConferenceController < ApplicationController
|
||||
load_and_authorize_resource find_by: :short_title
|
||||
|
||||
def show
|
||||
@conference = Conference.find_by_short_title(params[:id])
|
||||
not_found unless @conference.make_conference_public?
|
||||
end
|
||||
|
||||
def gallery_photos
|
||||
@photos = Conference.find_by_short_title(params[:id]).photos
|
||||
@photos = @conference.photos
|
||||
render "photos", formats: [:js]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue