First pass at Routing

Looks like I did this inefficiently—which is definitely obvious from
the roadblock I hit.

Retrying with this guy’s method:
http://jasoncodes.com/posts/rails-3-nested-resource-slugs
Added FriendlyID to the Gemfile

FriendlyID lets us make prettier URLs in a systematic way. It lets you
look up objects by its ID or by a specified param, which it then will
convert into a slug, cache, and do lots of other nice things with.
Database migrations for FriendlyID

• Adding the Cached Slugs table
• Adding slugs col to Projects and Users
• Making them unique
Extended FriendlyID into the User & Project models
FriendlyID mods to Controllers

Pretty basic modification to the Controllers to support FriendlyID.

• Stopped using find_by_username
• Got rid of my gnarly SQL join for finding the Project
Switched to Nested Resources for Routes

Instead of having a clusterfuck of custom routes that break Models,
we’ve moved to a nested resource tree.
Fixed the redirect paths in CheckinsController

Needed because of new routes
Updated Views to reflect new Routes

Form fragments:
We were manually defining the `action` path, which was bad because the
fragment should change the `action` based on if we’re rendering a
create or edit screen. With the new routes, it goes back to being
dynamic.

NOTE: [object1, object2, …] is the syntax for nested resources

Edit Checkin:
Removed the Back button. Fixed link on “Show”

Show Checkin:
Fixed paths. Also added a link to edit the checkin at the bottom.

Home:
Fixed a path.

Edit Project:
Fixed a path.

Show Project:
• Fixed paths
• Added links to standalone Checkin pages.
Removed .jbuilder files

Checkins > index, show
Merge pull request #2 from jedmund/routing

Routing refactor