aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations/association_scope_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use an `Attribute` object to represent a bind valueSean Griffin2015-01-271-1/+1
| | | | | | | | | | | The column is primarily used for type casting, which we're trying to separate from the idea of a column. Since what we really need is the combination of a name, type, and value, let's use the object that we already have to represent that concept, rather than this tuple. No consumers of the bind values have been changed, only the producers (outside of tests which care too much about internals). This is *finally* possible since the bind values are now produced from a reasonable number of lcoations.
* `WhereClause#predicates` does not need to be publicSean Griffin2015-01-271-5/+0
| | | | | | | | | | | 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-3/+3
|
* Merge branch 'master' into adequaterecordAaron Patterson2014-02-171-2/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (311 commits) Add a missing changelog entry for #13981 and #14035 Revert "Fixed plugin_generator test" implements new option :month_format_string for date select helpers [Closes #13618] add factory methods for empty alias trackers guarantee a list in the alias tracker so we can remove a conditional stop exposing table_joins make most parameters to the AliasTracker required make a singleton for AssociationScope pass the association and connection to the scope method pass the tracker down the stack and construct it in the scope method clean up add_constraints signature remove the reflection delegate remove klass delegator remove railties changes. fixes #14054 remove chain delegate remove scope_chain delegate Add verb to sanitization note fix path shown in mailer's templates updated Travis build status image url fix guide active_support_core_extensions. add Note to String#indent [ci skip] ... Conflicts: activerecord/lib/active_record/associations/join_dependency.rb activerecord/test/cases/associations/association_scope_test.rb
| * make a singleton for AssociationScopeAaron Patterson2014-02-141-2/+1
| | | | | | | | | | AssociationScope no longer maintains state, so we're safe to keep a singleton and save on GC time
| * pass the association and connection to the scope methodAaron Patterson2014-02-141-2/+4
| |
* | check bind parameter uniquenessAaron Patterson2014-01-131-1/+6
|/
* Represent association scope options as AR::Relations insternally.Jon Leighton2012-07-131-0/+15