aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/scoping/relation_scoping_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* `current_scope` shouldn't pollute sibling STI classesSean Griffin2015-02-111-0/+6
| | | | | | | | | | | | It looks like the only reason `current_scope` was thread local on `base_class` instead of `self` is to ensure that when we call a named scope created with a proc on the parent class, it correctly uses the default scope of the subclass. The reason this wasn't happening was because the proc captured `self` as the parent class, and we're not actually defining a real method. Using `instance_exec` fixes the problem. Fixes #18806
* `WhereClause#predicates` does not need to be publicSean Griffin2015-01-271-1/+1
| | | | | | | | | | | The only place it was accessed was in tests. Many of them have another way that they can test their behavior, that doesn't involve reaching into internals as far as they did. `AssociationScopeTest` is testing a situation where the where clause would have one bind param per predicate, so it can just ignore the predicates entirely. The where chain test was primarly duplicating the logic tested on `WhereClause` directly, so I instead just make sure it calls the appropriate method which is fully tested in isolation.
* Remove all references to `where_values` in testsSean Griffin2015-01-251-1/+1
|
* Build fix when running in isolationArun Agrawal2014-11-141-0/+1
| | | | | `Computer` class needs to be require See #17217 for more details
* :scissors: duplicated `require`sGodfrey Chan2014-10-141-1/+0
|
* make sure cache is not used for collection assocations tooAaron Patterson2014-10-141-1/+12
| | | | follow up for #17052
* break cache if we're inside a "scoping" call. fixes #17052Aaron Patterson2014-10-141-0/+10
| | | | | For now, we don't want to take "scoping" calls in to account when calculating cache keys for relations, so just opt-out.
* Make sure that fixtures are loaded before findingAkira Matsuda2014-08-141-0/+4
|
* FormatAkira Matsuda2014-08-141-2/+2
|
* do not rely on method_missing hitting arelAaron Patterson2014-03-241-2/+3
| | | | arel methods are not supposed to be public API for ActiveRecord
* split relation_scoping_test.rb's default scoping tests into another fileTakehiro Adachi2013-03-301-357/+0
|
* move tests for NamedScope and DefaultScope under test/cases/scoping/Takehiro Adachi2013-03-301-0/+688
The scoping/default.rb and scoping/named.rb got moved under scoping/ in commit 2b22564c4efaa63d4bbc006762838c4025c1bdca, but the tests never did.