Shortcut Blocks with Symbol to_proc
Category: Web Development > Ruby On Rails      Posted: 27 Apr 07

It may have a goofy syntax, but the Symbol#to_proc feature Rails adds allows you to do simple blocks very quickly and easily

Using with_scope
Category: Web Development > Ruby On Rails      Posted: 27 Apr 07

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!

Move Find into Model
Category: Web Development > Ruby On Rails      Posted: 27 Apr 07

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.

Find Through Association
Category: Web Development > Ruby On Rails      Posted: 27 Apr 07

No need to pass foreign keys in find conditions, just do the find through a has_many association.

Dynamic find_by Methods
Category: Web Development > Ruby On Rails      Posted: 27 Apr 07

Shorten simple finds considerably and improve readability by using the dynamic find_all_by and find_by methods

Caching with Instance Variables
Category: Web Development > Ruby On Rails      Posted: 27 Apr 07

Learn a quick way to improve performance. Just store the end result of an expensive command in an instance variable!

Creating a search engine in eight minutes
Category: Web Development > Ruby On Rails      Posted: 27 Apr 07

In eight minutes, we go from scratch to a complete Google-killing enterprise-class search engine. But since the actual application only took 76,417 lin...