method
merge!
v4.2.9 -
Show latest stable
- Class:
ActiveRecord::SpawnMethods
merge!(other)public
No documentation available.
# File activerecord/lib/active_record/relation/spawn_methods.rb, line 40
def merge!(other) # :nodoc:
if other.is_a?(Hash)
Relation::HashMerger.new(self, other).merge
elsif other.is_a?(Relation)
Relation::Merger.new(self, other).merge
elsif other.respond_to?(:to_proc)
instance_exec(&other)
else
raise ArgumentError, "#{other.inspect} is not an ActiveRecord::Relation"
end
end