Skip to content

Commit

Permalink
Update users_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
scaffeinate authored May 23, 2017
1 parent 1ec4993 commit 0781948
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def check_ownership
end

def set_user
@user = User.friendly.find_by(slug: params[:id])
@user = User.friendly.find_by(slug: params[:id]) || User.find_by(id: params[:id])
render_404 and return unless @user
end
end

0 comments on commit 0781948

Please sign in to comment.