Implement role authorization
This commit is contained in:
parent
6755328c4c
commit
e2fb434dc7
122 changed files with 1386 additions and 751 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class ConferenceController < ApplicationController
|
||||
load_and_authorize_resource find_by: :short_title
|
||||
|
||||
def show
|
||||
@conference = Conference.find_by_short_title(params[:id])
|
||||
redirect_to root_path, notice: "Conference not ready yet!!" unless @conference.make_conference_public?
|
||||
end
|
||||
|
||||
def subscribe
|
||||
|
|
@ -41,7 +41,7 @@ class ConferenceController < ApplicationController
|
|||
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