Sha256: 433602bcbf8e0cf28262b14e6b0245e35bb8ad21730c6b243a5126f0c53e8860

Contents?: true

Size: 521 Bytes

Versions: 5

Compression:

Stored size: 521 Bytes

Contents

module Mascot
  class SitemapController < ::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

5 entries across 5 versions & 1 rubygems

Version Path
mascot-rails-0.1.10 app/controllers/mascot/sitemap_controller.rb
mascot-rails-0.1.9 app/controllers/mascot/sitemap_controller.rb
mascot-rails-0.1.8 app/controllers/mascot/sitemap_controller.rb
mascot-rails-0.1.7 app/controllers/mascot/sitemap_controller.rb
mascot-rails-0.1.6 app/controllers/mascot/sitemap_controller.rb