提交 7c5320d2 编写于 作者: D Dmitriy Zaporozhets

Merge branch 'snippets-page' into 'master'

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

Fixes #1087
......@@ -19,6 +19,9 @@ class SnippetsController < ApplicationController
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册