Sha256: d36c1ba783cab61dac1501a541394c8c424b74ce495edaf07a343920beaa645c

Contents?: true

Size: 832 Bytes

Versions: 4

Compression:

Stored size: 832 Bytes

Contents

module RailsSitemap
  class Engine < ::Rails::Engine
    isolate_namespace RailsSitemap

    initializer 'rails_sitemap', before: :load_config_initializers do |app|
      Rails.application.routes.append do
        mount RailsSitemap::Engine => '/'
      end

      Mime::Type.register 'text/kml', :kml
    end
  end

  class << self
    mattr_accessor :models_for_sitemap,
                   :updated_at,
                   :priority,
                   :update_frequency_for_app,
                   :update_frequency_for_models,
                   :locations

    self.models_for_sitemap = []
    self.updated_at = DateTime.now.to_s
    self.priority = 0.5
    self.update_frequency_for_app = 'always'
    self.update_frequency_for_models = 'weekly'
    self.locations = []
  end

  def self.setup(&block)
    yield self
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_sitemap-0.2.3 lib/rails_sitemap/engine.rb
rails_sitemap-0.2.2 lib/rails_sitemap/engine.rb
rails_sitemap-0.2.1 lib/rails_sitemap/engine.rb
rails_sitemap-0.2.0 lib/rails_sitemap/engine.rb