Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add setting of FK for throgh associations while building | Ivan Antropov | 2014-05-25 | 1 | -0/+2 |
| | |||||
* | Deprecate eager-evaluated scopes. | Jon Leighton | 2012-03-21 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use this: scope :red, where(color: 'red') default_scope where(color: 'red') Use this: scope :red, -> { where(color: 'red') } default_scope { where(color: 'red') } The former has numerous issues. It is a common newbie gotcha to do the following: scope :recent, where(published_at: Time.now - 2.weeks) Or a more subtle variant: scope :recent, -> { where(published_at: Time.now - 2.weeks) } scope :recent_red, recent.where(color: 'red') Eager scopes are also very complex to implement within Active Record, and there are still bugs. For example, the following does not do what you expect: scope :remove_conditions, except(:where) where(...).remove_conditions # => still has conditions | ||||
* | Fix naughty trailing whitespace | Jon Leighton | 2010-10-31 | 1 | -1/+1 |
| | |||||
* | Support the :primary_key option on a through reflection in a nested through ↵ | Jon Leighton | 2010-10-19 | 1 | -1/+7 |
| | | | | association | ||||
* | Rename named_scope to scope | Pratik Naik | 2010-01-18 | 1 | -1/+1 |
| | |||||
* | Adding :from scoping to ActiveRecord calculations | Matt Duncan | 2009-08-09 | 1 | -0/+2 |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1229 state:committed] | ||||
* | fix assignment to has_one :through associations. | Matt Jones | 2008-11-15 | 1 | -0/+4 |
Signed-off-by: Michael Koziarski <michael@koziarski.com> |