Ryan Bates
Episode 6: Shortcut Blocks with Symbol to_proc
over 3 years ago by Ryan Bates on Railscasts.
It may have a goofy syntax, but the Symbol#to_proc feature Rails adds allows you to do simple blocks very quickly and easily....
Episode 5: Using with_scope
over 3 years ago by Ryan Bates on Railscasts.
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!...
Episode 4: Move Find into Model
over 3 years ago by Ryan Bates on Railscasts.
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...
Episode 3: Find Through Association
over 3 years ago by Ryan Bates on Railscasts.
No need to pass foreign keys in find conditions, just do the find through a has_many association....
Episode 2: Dynamic find_by Methods
over 3 years ago by Ryan Bates on Railscasts.
Shorten simple finds considerably and improve readability by using the dynamic find_all_by and find_by methods....
Episode 1: Caching with Instance Variables
over 3 years ago by Ryan Bates on Railscasts.
Learn a quick way to improve performance. Just store the end result of an expensive command in an instance variable!...
Episode 57: Create Model Through Text Field
over 3 years ago by Ryan Bates on Railscasts.
Let's say you provide a select menu for setting which category a given product belongs to, but you also want the option of creating a new category by typing...
Episode 58: How to Make a Generator
over 3 years ago by Ryan Bates on Railscasts.
Rails comes with many built-in generators, but what if you want to customize them or make your own? Rails gives you a great way to do this which you will...
Episode 59: Optimistic Locking
over 3 years ago by Ryan Bates on Railscasts.
When two people attempt to update the same record near the same time, one of the updates will likely be overwritten. You can solve this problem with optimistic...
Episode 60: Testing without Fixtures
over 3 years ago by Ryan Bates on Railscasts.
Tests which rely heavily on fixtures are brittle and can be difficult to maintain. This episode will show a couple techniques for creating tests which don...
