blob: 8ee472e6b407ffc65e54e45ef110dc011b37a08d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
class BlogsController < ApplicationController
def show
@blog = Blog.find_by_slug(params[:slug])
raise ActiveRecord::RecordNotFound unless @blog
raise ActiveRecord::RecordNotFound unless @blog.published
end
end
|