Sha256: 781358d06d493e231b38ef8ab8ac2659987cc17752eaa88263f4195663f1d19f
Contents?: true
Size: 448 Bytes
Versions: 7
Compression:
Stored size: 448 Bytes
Contents
class Character::Sitemap::SitemapGeneratorHelper def self.add_links(sitemap) url_helpers = Rails.application.routes.url_helpers url = "http://#{ @domain }" sitemap.add "#{ url }#{ url_helpers.posts_index_path }", changefreq: "daily" Character::Post.published.each do |post| sitemap.add "#{ url }#{ url_helpers.posts_show_path(post) }", changefreq: "weekly", lastmod: post.updated_at end end end
Version data entries
7 entries across 7 versions & 1 rubygems