Sha256: f45c98d075e8c2678a1e746d9ed5fb6b68c9325699a10da7299e6b516f72fe07

Contents?: true

Size: 335 Bytes

Versions: 3

Compression:

Stored size: 335 Bytes

Contents

class FrontEnd::PostController < FrontEndController

  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

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dust-cms-0.0.07 app/controllers/front_end/post_controller.rb
dust-cms-0.0.06 app/controllers/front_end/post_controller.rb
dust-cms-0.0.05 app/controllers/front_end/post_controller.rb