Skip to content

Commit

Permalink
Revert "actually url helper are not used any way, so get rid of it..."
Browse files Browse the repository at this point in the history
This reverts commit 5984438.
  • Loading branch information
Tobias Bielohlawek committed Mar 8, 2011
1 parent be119d2 commit 9a4804b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/big_sitemap.rb
Expand Up @@ -324,10 +324,18 @@ def url_for_sitemap(path)

class BigSitemapRails < BigSitemap

if defined?(Rails) && Rails.version < "3"
include ActionController::UrlWriter
end

def initialize(options={})
raise "No Rails Environment loaded" unless defined? Rails
require 'action_controller'

if Rails.version >= "3"
self.class.send(:include, Rails.application.routes.url_helpers)
end

DEFAULTS.merge!(:document_root => "#{Rails.root}/public", :url_options => default_url_options)
super(options)
end
Expand Down

0 comments on commit 9a4804b

Please sign in to comment.