Sha256: 8c84bff6b637929e0ba0ad1ad1c833ceb7c9c0e2eecc983034cc52f1bae5f097
Contents?: true
Size: 686 Bytes
Versions: 17
Compression:
Stored size: 686 Bytes
Contents
module PufferPages module Extensions module Mapper def self.included base base.class_eval do class_attribute :_puffer_pages include InstanceMethods end end module InstanceMethods def puffer_pages_options self.class._puffer_pages.presence || [{'(*path)' => 'pages#index', :as => 'puffer_page'}] end def puffer_pages *args options = args.extract_options! options.merge! :as => 'puffer_page' self.class._puffer_pages = args.push(options) end end end end end ActionDispatch::Routing::Mapper.send :include, PufferPages::Extensions::Mapper
Version data entries
17 entries across 17 versions & 1 rubygems