class StirFry::Pages::NotFoundPage
NotFoundPage is a simple page to display 404 errors appropriate for the request mime type
Public Instance Methods
Source
# File lib/stir_fry/pages/not_found_page.rb, line 9 def call if request.json? then response.json({ error: "not_found", message: "Not Found" }, :not_found) elsif request.html? then response.html(render, :not_found) else response.text("Not Found", :not_found) end end
Overrides Component#call to customize the output based on mime.