Sha256: f20556248f69726e9062f8bfb5f8418b9e4058a1927f64cbef4a85430f4b75bb
Contents?: true
Size: 636 Bytes
Versions: 1
Compression:
Stored size: 636 Bytes
Contents
module PufferPages module Extensions module Mapper extend ActiveSupport::Concern included do class_attribute :_puffer_pages 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
puffer_pages-0.1.0 | lib/puffer_pages/extensions/mapper.rb |