RailsCasts Pro episodes are now free!

Learn more or hide this

Applied Filters: rails xActive Record x
Two Many-to-Many
Episode #47 – Jun 20, 2007 – 78 comments

Two Many-to-Many

There are two different ways to set up a many-to-many association in Rails. In this episode you will see how to implement both ways along with some tips on choosing the right one for your project. (9 minutes)
Model Name in URL
Episode #63 – Jul 27, 2007 – 60 comments

Model Name in URL

By default, Rails uses the model's id in the URL. What if you want to use the name of the model instead? You can change this behavior by overriding the to_param method in the model. Watch this episode for details. (6 minutes)
Time in Text Field
Episode #32 – May 16, 2007 – 48 comments

Time in Text Field

Although Rails does allow you to edit time attributes with text fields, it's not very flexible. In this episode you will learn how to use a virtual attribute to format the time to your liking. (5 minutes)
SQL Injection
Episode #25 – Apr 30, 2007 – 37 comments

SQL Injection

One of the most common security problems for dynamic sites is SQL Injection. Thankfully Rails does everything it can in solving this issue, but you still need to be aware of it. (5 minutes)
Counter Cache Column
Episode #23 – Apr 25, 2007 – 69 comments

Counter Cache Column

If you need to display the record count for a has_many association, you can improve performance by caching that number in a column. (7 minutes)