Permalink
Browse files

Revert "actually url helper are not used any way, so get rid of it..."

This reverts commit 5984438.
  • Loading branch information...
1 parent be119d2 commit 9a4804b8a77989ffe1cc95abea6c86d59f1114a7 Tobias Bielohlawek committed Mar 8, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/big_sitemap.rb
View
@@ -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

0 comments on commit 9a4804b

Please sign in to comment.