Method: ApplicationController#show

Defined in:
app/controllers/application_controller.rb

#showObject

> Specific page content

> All slugrouter requests passed here (including root)

> Liquid ref - github.com/Shopify/liquid/wiki/Liquid-for-Programmers#first-steps

> If not using bang operator in find, use || “No Content”

Raises:

  • (ActionController::RoutingError)


29
30
31
32
# File 'app/controllers/application_controller.rb', line 29

def show
  raise ActionController::RoutingError.new('Not Found') if params[:id] == "index"
  @content = Node.find_by_slug! params[:id] || "index"
end