def update(other)
other_options = if kind_of?(other.class)
return self if self.eql?(other)
assert_valid_other(other)
other.options
else
other = other.to_hash
return self if other.empty?
other
end
@options = @options.merge(other_options).freeze
assert_valid_options(@options)
normalize = other_options.only(*OPTIONS - [ :conditions ]).map do |attribute, value|
instance_variable_set("@#{attribute}", value.try_dup)
attribute
end
merge_conditions([ other_options.except(*OPTIONS), other_options[:conditions] ])
normalize_options(normalize | [ :links, :unique ])
self
end