diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-12-04 22:26:16 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-12-04 22:26:16 +0530 |
commit | 40e16121c05f10f9b75b6cd68c32092876142861 (patch) | |
tree | ef029336773e706cad2442d232a184ff0db38efe /activerecord/lib/active_record/relation/spawn_methods.rb | |
parent | 9d3ce6c7d24fb8fe63f4bde4718e6af6225e5a98 (diff) | |
parent | 2b847a0a9b56c7ede40012c7b3bd8ec90d6c111c (diff) | |
download | rails-40e16121c05f10f9b75b6cd68c32092876142861.tar.gz rails-40e16121c05f10f9b75b6cd68c32092876142861.tar.bz2 rails-40e16121c05f10f9b75b6cd68c32092876142861.zip |
Merge branch 'master' of github.com:lifo/docrails
Conflicts:
guides/source/migrations.md
Diffstat (limited to 'activerecord/lib/active_record/relation/spawn_methods.rb')
-rw-r--r-- | activerecord/lib/active_record/relation/spawn_methods.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/relation/spawn_methods.rb b/activerecord/lib/active_record/relation/spawn_methods.rb index 352dee3826..d417e82548 100644 --- a/activerecord/lib/active_record/relation/spawn_methods.rb +++ b/activerecord/lib/active_record/relation/spawn_methods.rb @@ -12,9 +12,6 @@ module ActiveRecord # Merges in the conditions from <tt>other</tt>, if <tt>other</tt> is an <tt>ActiveRecord::Relation</tt>. # Returns an array representing the intersection of the resulting records with <tt>other</tt>, if <tt>other</tt> is an array. - # - # ==== Examples - # # Post.where(published: true).joins(:comments).merge( Comment.where(spam: false) ) # # Performs a single join query with both where conditions. # @@ -29,7 +26,6 @@ module ActiveRecord # # => Post.where(published: true).joins(:comments) # # This is mainly intended for sharing common conditions between multiple associations. - # def merge(other) if other.is_a?(Array) to_a & other @@ -51,11 +47,8 @@ module ActiveRecord # Removes from the query the condition(s) specified in +skips+. # - # Example: - # # Post.order('id asc').except(:order) # discards the order condition # Post.where('id > 10').order('id asc').except(:where) # discards the where condition but keeps the order - # def except(*skips) result = Relation.new(klass, table, values.except(*skips)) result.default_scoped = default_scoped @@ -65,11 +58,8 @@ module ActiveRecord # Removes any condition from the query other than the one(s) specified in +onlies+. # - # Example: - # # Post.order('id asc').only(:where) # discards the order condition # Post.order('id asc').only(:where, :order) # uses the specified order - # def only(*onlies) result = Relation.new(klass, table, values.slice(*onlies)) result.default_scoped = default_scoped |