Class: FallbackController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- FallbackController
- Defined in:
- app/controllers/fallback_controller.rb
Overview
Fallback controller for the rest of URLs
Tries to find and show editable page with given url
Instance Method Summary collapse
-
#show ⇒ Object
get (:slug).
Instance Method Details
#show ⇒ Object
get (:slug)
8 9 10 11 12 13 14 15 |
# File 'app/controllers/fallback_controller.rb', line 8 def show url = params[:slug] @editable_page = EditablePage.fallback_page("/#{url}", locale) if @editable_page.nil? handle_http_404("Cannot find fallback page for url /#{url}") end end |