RailsCasts Pro episodes are now free!

Learn more or hide this

Taryn East's Profile

GitHub User: taryneast

Site: http://rubyglasses.blogspot.com/

Comments by Taryn East

Avatar

How would I build tests for the "find_products" method?

Avatar

later versions of rails do not perform the search until you actually use the results. So every one of the calls in the code just builds a set of conditions.

it will not hit the database until you use "all" or "each" on "products"