Class: FallbackController

Inherits:
ApplicationController
  • Object
show all
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

Instance Method Details

#showObject

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