Class: FrontEnd::PostController

Inherits:
FrontEndController
  • Object
show all
Defined in:
app/controllers/front_end/post_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
10
11
12
# File 'app/controllers/front_end/post_controller.rb', line 3

def show
  @post = Dust::Post.find_by_filename("post/#{params[:filename]}")

  if @post == nil
    raise Exceptions::PageNotFound
  end

  rescue Exceptions::PageNotFound
    render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404
end