diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-05-08 23:56:25 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-05-08 23:56:25 +0530 |
commit | 7918d7bf5c6f0ce53e648c793f6034d6216a4808 (patch) | |
tree | febc17be0b2768394b67a14fa7dee842d3bde3b6 /activerecord | |
parent | 882e750cbe09450388190e92e2d92eac352b40fa (diff) | |
parent | 7e26f7f0f7e3c230c333e1b265727a9b8cf7c91f (diff) | |
download | rails-7918d7bf5c6f0ce53e648c793f6034d6216a4808.tar.gz rails-7918d7bf5c6f0ce53e648c793f6034d6216a4808.tar.bz2 rails-7918d7bf5c6f0ce53e648c793f6034d6216a4808.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/relation/spawn_methods.rb | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/result.rb | 1 |
2 files changed, 3 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) diff --git a/activerecord/lib/active_record/result.rb b/activerecord/lib/active_record/result.rb index fb4b89b87b..fd276ccf5d 100644 --- a/activerecord/lib/active_record/result.rb +++ b/activerecord/lib/active_record/result.rb @@ -28,6 +28,7 @@ module ActiveRecord alias :map! :map alias :collect! :map + # Returns true if there are no records. def empty? rows.empty? end |