alexrabarts-big_sitemap 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/VERSION.yml +1 -1
- data/big_sitemap.gemspec +1 -1
- data/lib/big_sitemap.rb +2 -3
- metadata +1 -1
data/History.txt
CHANGED
data/VERSION.yml
CHANGED
data/big_sitemap.gemspec
CHANGED
data/lib/big_sitemap.rb
CHANGED
@@ -117,9 +117,8 @@ class BigSitemap
|
|
117
117
|
|
118
118
|
param_method = pick_method(record, PARAM_METHODS)
|
119
119
|
|
120
|
-
location = defined?(Rails) ?
|
121
|
-
|
122
|
-
"#{root_url}/#{strip_leading_slash(options[:path])}/#{record.send(param_method)}"
|
120
|
+
location = defined?(Rails) ? polymorphic_url(record) : nil rescue nil
|
121
|
+
location ||= "#{root_url}/#{strip_leading_slash(options[:path])}/#{record.send(param_method)}"
|
123
122
|
|
124
123
|
change_frequency = options[:change_frequency] || 'weekly'
|
125
124
|
freq = change_frequency.is_a?(Proc) ? change_frequency.call(record) : change_frequency
|