Showing 5 videos tagged with association

Railscast - Episode 3: Find Through Association

00:02:17 railscasts.com
No need to pass foreign keys in find conditions, just do the find through a has_many association.

Railscast - Episode 4: Move Find into Model

00:02:03 railscasts.com
Move a find into the model to clean up the controllers and remove duplication. Also see how you can call these custom find methods through an association.

Railscast - Episode 14: Performing Calculations on Models

00:02:57 railscasts.com
Did you know ActiveRecord provides class methods for performing calculations on models? You can even use these methods through associations.

Railscast - Episode 47: Two Many-to-Many

00:09:00 railscasts.com
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.

Railscast - Episode 102: Auto-Complete Association

00:13:29 railscasts.com
Usually a select menu is used for setting a belongs_to association, but in this episode I will show you how to use a text field with auto completion.