Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Changed the ScopeRegistry and the InstrumentationRegistry to use the | wangjohn | 2013-04-09 | 1 | -6/+6 |
| | | | | PerThreadRegistry module. | ||||
* | Delegating the value getter and setters in the ScopeRegistry to the | wangjohn | 2013-04-08 | 1 | -7/+14 |
| | | | | current ScopeRegister object. | ||||
* | Grouping thread locals in the ActiveRecord scopes so that the | wangjohn | 2013-04-08 | 1 | -2/+53 |
| | | | | | current_scope and ignore_default_scope locals are brought together under a registry object. | ||||
* | Fix scope chaining + STI | Jon Leighton | 2013-04-05 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See #9869 and #9929. The problem arises from the following example: class Project < ActiveRecord::Base scope :completed, -> { where completed: true } end class MajorProject < Project end When calling: MajorProject.where(tasks_count: 10).completed This expands to: MajorProject.where(tasks_count: 10).scoping { MajorProject.completed } However the lambda for the `completed` scope is defined on Project. This means that when it is called, `self` is Project rather than MajorProject. So it expands to: MajorProject.where(tasks_count: 10).scoping { Project.where(completed: true) } Since the scoping was applied on MajorProject, and not Project, this fails to apply the tasks_count condition. The solution is to make scoping apply across STI classes. I am slightly concerned about the possible side-effects of this, but no tests fail and it seems ok. I guess we'll see. | ||||
* | Refactor to use each_key, remove extra spaces | Carlos Antonio da Silva | 2013-01-28 | 1 | -2/+0 |
| | |||||
* | load active_support/concern in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | |||||
* | extract #with_scope and #with_exclusive_scope to ↵ | Jon Leighton | 2012-04-25 | 1 | -121/+0 |
| | | | | active_record_deprecated_finders | ||||
* | Move DefaultScope and NamedScope under Scoping | Jon Leighton | 2011-12-15 | 1 | -0/+5 |
| | |||||
* | Split out most of the AR::Base code into separate modules :cake: | Jon Leighton | 2011-12-15 | 1 | -0/+147 |