rhodes369/rhodes-ror — pull request #84 by doktorj (2012-03-27 13:11:42+00:00)
Title: got seo links working with slugged gem

long night of trying to figure out the best route for seo urls in rails 3.2 since this suddenly seems like a priority and i've never done it before.

i contemplated doing it from scratch, but then started to realize it's not a simple thing to do right, so i started looking at gems, and installed the friendly_id gem which worked but was pretty magical in an ugly way, then found the slugged gem, installed it, and it didn't work at first, then gave up on it, then later came back to it and reinstalled it and got it working based on mat title. it's much cleaner than the friendly_id gem, and it keeps a databased history of slugged urls, in case the client changes the title, all previous title urls will still work! which is key for both user bookmarks and seo.

also updated all calls to Material.find() (where appropriate) to Material.find_using_slug()