Module: Sitemapper::Adapters::RailsAdapter::RoutesMapperExtension
- Includes:
- Sitemapper::Accessors
- Defined in:
- lib/sitemapper/adapters/rails_adapter.rb
Class Method Summary collapse
Instance Method Summary collapse
- #connect_with_sitemap(path, options = {}) ⇒ Object
- #named_route_with_sitemap(name, path, options = {}) ⇒ Object
- #root_with_sitemap(options = {}) ⇒ Object
Class Method Details
.included(base) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/sitemapper/adapters/rails_adapter.rb', line 7 def self.included(base) base.class_eval do alias_method_chain :named_route, :sitemap alias_method_chain :connect, :sitemap alias_method_chain :root, :sitemap end end |
Instance Method Details
#connect_with_sitemap(path, options = {}) ⇒ Object
20 21 22 23 |
# File 'lib/sitemapper/adapters/rails_adapter.rb', line 20 def connect_with_sitemap(path, = {}) map_if_possible(path, ) connect_without_sitemap(path, ) end |
#named_route_with_sitemap(name, path, options = {}) ⇒ Object
15 16 17 18 |
# File 'lib/sitemapper/adapters/rails_adapter.rb', line 15 def named_route_with_sitemap(name, path, = {}) map_if_possible(path, ) named_route_without_sitemap(name, path, ) end |
#root_with_sitemap(options = {}) ⇒ Object
25 26 27 28 |
# File 'lib/sitemapper/adapters/rails_adapter.rb', line 25 def root_with_sitemap( = {}) map_if_possible('/', ) root_without_sitemap() end |