TODO: make gem for this
This was tested using Rails 3.2 and Rails 4.0 on Ruby 2.0.0.
Set the install directory for Bower components:
By default, Rails applications build URLs based on the primary key -- the
id column from the database. Imagine we have a
Person model and associated controller. We have a person record for
Bob Martin that has
6. The URL for his show page would be:
But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the
6 here, is called the "slug". Let's look at a few ways to implement better slugs.