Commit 7c5320d2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'snippets-page' into 'master'

Render 404 instead of 500 if trying to see snippets of unexisting user

Fixes #1087
parents f84d015f a39eeba1
......@@ -19,6 +19,9 @@ def index
def user_index
@user = User.find_by(username: params[:username])
render_404 and return unless @user
@snippets = @user.snippets.fresh.non_expired
if @user == current_user
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment