holderdeord/hdo-site — pull request #54 by jonathanronen (2012-07-10 20:32:44+00:00)
Title: Added friendly id's for following entities: (#23)

- Representative (slug is external_id)
- Committee (external_id)
- Category (unique name)
- District (unique name)
- Field (unique name)
- Issue (external_id)
- Party (external_id)
- Vote (external_id)

Friendly id's are stable in the sense that new slugs are not generated when modifying an existing entity, even if the change affects the field the slug was built on.

Re-import data after migrating db schema to generate slugs. Alternatively, load and save all entities (i.e. Representative.find_each(&:save) ).