We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db70c70 commit 4180feaCopy full SHA for 4180fea
1 file changed
app/controllers/blog_posts_controller.rb
@@ -16,5 +16,7 @@ def index
16
def show
17
@post = BlogPost.published.find(params[:id])
18
@other_posts = BlogPost.published.ordered_by_recency.includes(:author).where.not(id: @post.id).limit(6)
19
+ rescue ActiveRecord::RecordNotFound
20
+ render_404
21
end
22
0 commit comments