aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Allow Relation#merge to take a proc.Jon Leighton2012-08-031-0/+4
| | | | | | | | | | | | | | | | | | This was requested by DHH to allow creating of one's own custom association macros. For example: module Commentable def has_many_comments(extra) has_many :comments, -> { where(:foo).merge(extra) } end end class Post < ActiveRecord::Base extend Commentable has_many_comments -> { where(:bar) } end
* fix association :extend optionJon Leighton2012-07-131-2/+5
|
* Relation#from to accept other Relation objectsRadoslav Stankov2012-05-171-1/+6
| | | | Record.from("(#{sub_query.to_sql})") -> Record.from(sub_query) Record.from("(#{sub_query.to_sql}) a") -> Record.from(sub_query, :a)
* fix interpolation for hash mergingJon Leighton2012-04-251-4/+13
|
* allow merging a single where valueJon Leighton2012-04-251-0/+6
|
* fix testsJon Leighton2012-04-131-6/+0
|
* now we can just manipulate the values hash in #only and #exceptJon Leighton2012-04-131-0/+13
|
* use a hash to store relation valuesJon Leighton2012-04-131-7/+7
|
* remove apply_finder_options call from AssociationScopeJon Leighton2012-04-131-0/+5
|
* Make Relation#extending work like other value methodsJon Leighton2012-04-131-8/+9
|
* Add Relation#merge!Jon Leighton2012-04-131-0/+5
|
* assert valid keysJon Leighton2012-04-131-0/+4
|
* Allow Relation#merge to take a hashJon Leighton2012-04-131-2/+20
|
* we have no need for the ASSOCIATION_METHODS constantJon Leighton2012-04-131-8/+1
|
* we don't need to test that constant assignment worksJon Leighton2012-04-131-15/+0
|
* Add bang versions of relation query methods.Jon Leighton2012-04-121-0/+52
| | | | | The main reason for this is that I want to separate the code that does the mutating from the code that does the cloning.
* Deprecate inferred JOINs with includes + SQL snippets.Jon Leighton2012-01-161-0/+6
| | | | | | See the CHANGELOG for details. Fixes #950.
* store references as a stringJon Leighton2012-01-161-2/+2
|
* Add ActiveRecord::Relation#references (#950)Jon Leighton2012-01-161-1/+14
|
* Revert "Deprecate implicit eager loading. Closes #950."Jon Leighton2012-01-161-6/+0
| | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9.
* correctly handle order calls after a reorderMatt Jones + Scott Walker2012-01-031-1/+1
|
* Deprecate implicit eager loading. Closes #950.Jon Leighton2011-12-291-0/+6
|
* Add ActiveRecord::Relation#uniq for toggling DISTINCT in the SQL queryJon Leighton2011-11-051-1/+1
|
* oops! remove debugging codesAaron Patterson2011-06-271-1/+0
|
* default create_with_value to a hash so we can eliminate conditionals, add ↵Aaron Patterson2011-06-271-1/+2
| | | | test surrounding create_with(nil) behavior
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* Fix issue #1272Brian Mathiyakom2011-06-011-1/+1
| | | | | Set reverse_order_value when asked to reverse_order(). Do the actual reversal in build_arel.
* Evaluate default scopes at the last possible moment in order to avoid ↵Jon Leighton2011-04-121-1/+1
| | | | problems with default scopes getting included into other scopes and then being unable to remove the default part via unscoped.
* isolating eager_loading? methodAaron Patterson2010-11-301-0/+11
|
* making sure scope_for_create value is cachedAaron Patterson2010-11-301-0/+12
|
* surrounding scope_for_create behaviorAaron Patterson2010-11-301-0/+14
|
* Ruby 1.8, how does it work?Aaron Patterson2010-11-301-6/+6
|
* testing combined nodes are not traversedAaron Patterson2010-11-301-0/+9
|
* adding more tests surrounding where_values_hashAaron Patterson2010-11-301-3/+19
|
* testing Relation#table_nameAaron Patterson2010-11-301-0/+21
|
* adding a test for ActiveRecord::RelationAaron Patterson2010-11-301-0/+56