Skip to content

This is fun! #11

Merged
merged 1 commit into from Mar 22, 2013

2 participants

@davekaro

New features to review with new pull requests every day?!

Anyways, the key here is I wanted to use ActiveRecord::Relation to keep the duplication down. When you do something like Athlete.where(:affiliate => 'southie') - Rails will just create an ActiveRecord::Relation object, and not actually hit the database. Then, you can use this object to chain on more conditions, all with never hitting the database. The database will finally be queried once you start to iterate over the results, which usually isn't until the view.

@mikepmunroe mikepmunroe merged commit fd0672b into mikepmunroe:master Mar 22, 2013
@mikepmunroe
Owner
@davekaro
@mikepmunroe
Owner
@davekaro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.