Skip to content

Commit

Permalink
Merge pull request #168 from TelosLabs/user-session
Browse files Browse the repository at this point in the history
Fix session#show when navigating as guest
  • Loading branch information
LuigiR0jas committed Sep 9, 2024
2 parents fc3933a + 2d7d407 commit c9a28fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def index
end

def show
@user_session_ids = current_user.sessions.pluck(:id)
@user_session_ids = current_user&.sessions&.pluck(:id) || []
@session = if user_signed_in?
sessions.friendly.includes(:location, :tags, speakers: [profile: :image_attachment]).find(params[:id])
else
Expand Down

0 comments on commit c9a28fd

Please sign in to comment.