Class: FallbackController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/fallback_controller.rb

Overview

Fallback controller for URL outside router

Instance Method Summary collapse

Instance Method Details

#showObject

get (:slug)



6
7
8
9
10
11
# File 'app/controllers/fallback_controller.rb', line 6

def show
  url = params[:slug]

  @dynamic_page = DynamicPage.find_by(url: "/#{url}")
  handle_http_404 if @dynamic_page.nil?
end