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 CHANGED
@@ -1,5 +1,9 @@
1
1
  === 0.3.2 / 2009-06-09
2
2
 
3
+ * Better handling of URLs when Rails' polymorphic_url isn't available in the model
4
+
5
+ === 0.3.2 / 2009-06-09
6
+
3
7
  * Fixes "uninitialized constant ActionController" error
4
8
  * Fixes "Unknown key(s): path" error
5
9
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 3
4
- :patch: 2
4
+ :patch: 3
data/big_sitemap.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{big_sitemap}
5
- s.version = "0.3.2"
5
+ s.version = "0.3.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alex Rabarts"]
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
- polymorphic_url(record) :
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alexrabarts-big_sitemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rabarts