Permalink
Browse files

Add nodocs to delegation module and docs for merge!

  • Loading branch information...
1 parent 21123d3 commit 27014bbf513ebb2dde143ebd745283496e7db558 @oscardelben oscardelben committed Jul 17, 2012
@@ -1,7 +1,7 @@
require 'active_support/core_ext/module/delegation'
module ActiveRecord
- module Delegation
+ module Delegation # :nodoc:
# Set up common delegations for performance (avoids method_missing)
delegate :to_xml, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to_ary, :to => :to_a
delegate :table_name, :quoted_table_name, :primary_key, :quoted_primary_key,
@@ -34,6 +34,7 @@ def merge(other)
end
end
+ # Like #merge, but applies changes in place.
def merge!(other)
klass = other.is_a?(Hash) ? Relation::HashMerger : Relation::Merger
klass.new(self, other).merge

0 comments on commit 27014bb

Please sign in to comment.