Module: DuckMap::SitemapHelpers
- Extended by:
- ActiveSupport::Concern
- Included in:
- ActionViewTestObject
- Defined in:
- lib/duck_map/view_helpers.rb
Overview
Contains methods for generating the contants of a sitemap.
Instance Method Summary collapse
-
#sitemap_content(&block) ⇒ NilClass
View helper method to generate the content of a sitemap.
Instance Method Details
#sitemap_content(&block) ⇒ NilClass
View helper method to generate the content of a sitemap. Loops through all of the current Hashes contained in Model#sitemap_model.
To see it in action, have a look at the file.
/app/views/sitemap/default_template.xml.erb
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/duck_map/view_helpers.rb', line 20 def sitemap_content(&block) if defined?(self.sitemap_model) && self.sitemap_model.kind_of?(Array) self.sitemap_model.each do |row| block.call(row) end end return nil end |