Showing 16 videos tagged with activerecord

Railscast - Episode 2: Dynamic find_by Methods

00:01:28 railscasts.com
Shorten simple finds considerably and improve readability by using the dynamic find_all_by and find_by methods.

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 5: Using with_scope

00:02:50 railscasts.com
Learn how to use with_scope - a very powerful method which will allow your custom find methods to accept any find options. Just like magic!

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 15: Fun with Find Conditions

00:04:31 railscasts.com
You can pass more than simple strings to find conditions. Arrays, ranges, and nil values can be passed as well. In this episode you will see the tricks involved with passing these odd objects to find conditions. (Update: audio fixed).

Railscast - Episode 62: Hacking ActiveRecord

00:11:13 railscasts.com
Have you ever wanted to temporarily disable all validations? Well, ActiveRecord doesn't support this, but that doesn't mean we can't add it. This episode will show you how to open up an existing class and change its behavior.