Sha256: dce22a0b4078d9dfab8069f6fe2e3b4e1d924abeaf63aa4e939ac5148c7efb47
Contents?: true
Size: 518 Bytes
Versions: 2
Compression:
Stored size: 518 Bytes
Contents
module Mascot class SiteController < ::ApplicationController rescue_from Mascot::PageNotFoundError, with: :page_not_found def show mascot.render mascot.find_resource end protected def resources @_mascot_resources ||= Mascot.configuration.resources end def mascot @_mascot_context ||= Mascot::ActionControllerContext.new(controller: self, resources: resources) end def page_not_found(e) raise ActionController::RoutingError, e.message end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mascot-rails-0.1.12 | app/controllers/mascot/site_controller.rb |
mascot-rails-0.1.11 | app/controllers/mascot/site_controller.rb |