-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is fun! #11
This is fun! #11
Conversation
Dropping science, I love it! On Thu, Mar 21, 2013 at 10:36 AM, Dave Kroondyk notifications@github.comwrote:
Mike Munroe |
Huh. I just noticed too in the male female conditions you have == where it On Thursday, March 21, 2013, Mike Munroe wrote:
|
Yep, did that tonight. Just pushed. Also added the qualified check, but the code is suspect because I did not The other fun thing I have spent some time working through tonight is this On Thu, Mar 21, 2013 at 9:31 PM, Dave Kroondyk notifications@github.comwrote:
Mike Munroe |
lol at the Rails bug. The wonders of open source. Though, I'd wager you run On Thu, Mar 21, 2013 at 10:29 PM, Mike Munroe notifications@github.comwrote:
|
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.