alexrabarts/big_sitemap — pull request #33 by wesg (2012-05-08 16:37:31+00:00)
Title: Adding support for static and dynamic collections

Adding support for static and dynamic collections. (Dynamic collections can call a method to get a URL from each object in the collection - keeps things DRY)

Background - I've been using Big_sitemap for generating a sitemap dynamically, passing in collections returned by scope, and then calling a method to get the URL for that object instance. Different models have slightly different methods to call for vanity URLs (and some classes have multiple methods for different URLs).

Building a sitemap this way using block in the BigSitemap.generate() block was getting a bit messy so I reopened the BigSitemap class and added a couple of methods to DRY things up ........ submitting the pull request as I think other may find it useful - I'm prepared to tweak, incorporate feedback and try a second explanation in the README if it's not clear enough.

Regards,
Wesley
@wesg