Class: FrontEnd::PageController
- Inherits:
-
FrontEndController
- Object
- FrontEndController
- FrontEnd::PageController
- Defined in:
- app/controllers/front_end/page_controller.rb
Instance Method Summary collapse
Instance Method Details
#root_redirect ⇒ Object
21 22 23 24 25 |
# File 'app/controllers/front_end/page_controller.rb', line 21 def root_redirect if "/#{Dust.config.root}" == request.fullpath redirect_to root_url, :status => 301 end end |
#search ⇒ Object
17 18 19 |
# File 'app/controllers/front_end/page_controller.rb', line 17 def search @results = (params[:query].present? ? Dust::Block.search(params[:query]) : []) end |
#show ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/controllers/front_end/page_controller.rb', line 5 def show @page = Dust::Page.find_by_filename(params[:filename]) @contact = Dust::Contact.new if @page == nil raise Exceptions::PageNotFound end rescue Exceptions::PageNotFound render :file => "#{Rails.root}/public/404.html", :layout => false, :status => 404 end |