aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/relation/spawn_methods.rb
diff options
context:
space:
mode:
authorMitch Crowe <crowe.mitch@gmail.com>2012-05-05 18:34:54 -0700
committerMitch Crowe <crowe.mitch@gmail.com>2012-05-05 18:34:54 -0700
commitf9646c8a6312e8d2d5ecc5d35e6201a7f4fe00ba (patch)
tree56b7646122edceed1adbc7cfd239f95150edf5f7 /activerecord/lib/active_record/relation/spawn_methods.rb
parentb7e3f3c7c40e31572d941cb29fe03fd8d95e3985 (diff)
downloadrails-f9646c8a6312e8d2d5ecc5d35e6201a7f4fe00ba.tar.gz
rails-f9646c8a6312e8d2d5ecc5d35e6201a7f4fe00ba.tar.bz2
rails-f9646c8a6312e8d2d5ecc5d35e6201a7f4fe00ba.zip
SpawnMethods#merge returns the intersection when passed an array, and not the union. Update the documentation to reflect this.
Diffstat (limited to 'activerecord/lib/active_record/relation/spawn_methods.rb')
-rw-r--r--activerecord/lib/active_record/relation/spawn_methods.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb
index 41e55dfd0e..f6d178db7a 100644
--- a/activerecord/lib/active_record/relation/spawn_methods.rb
+++ b/activerecord/lib/active_record/relation/spawn_methods.rb
@@ -7,7 +7,7 @@ module ActiveRecord
module SpawnMethods
# Merges in the conditions from <tt>other</tt>, if <tt>other</tt> is an <tt>ActiveRecord::Relation</tt>.
- # Returns an array representing the union of the resulting records with <tt>other</tt>, if <tt>other</tt> is an array.
+ # Returns an array representing the intersection of the resulting records with <tt>other</tt>, if <tt>other</tt> is an array.
#
# ==== Examples
#
@@ -16,7 +16,7 @@ module ActiveRecord
#
# recent_posts = Post.order('created_at DESC').first(5)
# Post.where(:published => true).merge(recent_posts)
- # # Returns the union of all published posts with the 5 most recently created posts.
+ # # Returns the intersection of all published posts with the 5 most recently created posts.
# # (This is just an example. You'd probably want to do this with a single query!)
#
def merge(other)