app/controllers/ishapi/galleries_controller.rb in ishapi-0.1.8.140 vs app/controllers/ishapi/galleries_controller.rb in ishapi-0.1.8.141
- old
+ new
@@ -22,10 +22,10 @@
def show
@gallery = ::Gallery.unscoped.find_by :galleryname => params[:galleryname]
authorize! :show, @gallery
if @gallery.premium?
- if current_user.profile.has_premium_purchase( @gallery )
+ if current_user&.profile&.has_premium_purchase( @gallery )
render 'show_premium_unlocked'
else
render 'show_premium_locked'
end
else