Skip to content

Commit

Permalink
fixed 500 on photos#show for private photos and logged out user
Browse files Browse the repository at this point in the history
  • Loading branch information
jhass committed Nov 10, 2011
1 parent cfbc2b7 commit 10fa7ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/photos_controller.rb
Expand Up @@ -144,7 +144,7 @@ def show
if user_signed_in?
@photo = current_user.find_visible_shareable_by_id(Photo, params[:id])
else
@photo = Photo.where(id => params[:id], :public => true)
@photo = Photo.where(:id => params[:id], :public => true).first
end

if @photo
Expand Down

0 comments on commit 10fa7ba

Please sign in to comment.