RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: model xRevised Episodes xRouting x
Model Name in URL (revised)
Episode #63Dec 16, 201285 comments

Model Name in URL (revised)

A model's ID in the URL is not very helpful to the user. Consider adding the name which can also improve SEO. Learn how to override to_param, add a slug attribute, and make a catch all route for deep nesting. (9 minutes)
Polymorphic Association (revised)
Episode #154May 19, 201299 comments

Polymorphic Association (revised)

A polymorphic association allows a model to belong_to different types of other models. Here I show how to make a single comment model belong to articles, photos, and events. (11 minutes)