Fix photo#show for non-logged-in user
This commit is contained in:
parent
1c9a96e2aa
commit
ad27eaac3d
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ class PhotosController < ApplicationController
|
|||
# helpers
|
||||
|
||||
def ownership
|
||||
@ownership ||= current_user.owns? photo
|
||||
@ownership ||= (current_user.present? && current_user.owns?(photo))
|
||||
end
|
||||
|
||||
def parent
|
||||
|
|
|
|||
Loading…
Reference in a new issue