Skip to content
Browse files

don't generate XML node if location does not exist

  • Loading branch information...
1 parent 5e4c65b commit b5285e737632323ecca481bd5f353caa030b14aa @yannski yannski committed with Oct 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/big_sitemap.rb
View
2 lib/big_sitemap.rb
@@ -187,7 +187,7 @@ def generate_models
pri = priority.is_a?(Proc) ? priority.call(record) : priority
last_id = primary_column ? record.send(primary_method) : nil
- sitemap.add_url!(location, last_mod, freq, pri, last_id)
+ sitemap.add_url!(location, last_mod, freq, pri, last_id) if location
end
end
end

0 comments on commit b5285e7

Please sign in to comment.
Something went wrong with that request. Please try again.