lib/sn_foil/contexts/destroy_context.rb in snfoil-0.8.3 vs lib/sn_foil/contexts/destroy_context.rb in snfoil-0.8.4
- old
+ new
@@ -54,10 +54,11 @@
end
def setup_destroy_object(id: nil, object: nil, **options)
raise ArgumentError, 'one of the following keywords is required: id, object' unless id || object
- options.merge! object: wrap_object(object || scope.resolve.find(id))
+ options[:object] = wrap_object(object || scope.resolve.find(id))
+ options
end
def destroy(**options)
options[:action] = :destroy
options = before_setup_destroy_object(**options)