module Granite::Action::AssignAttributes
We are using a lot of stacked additional logic for `assign_attributes` At least, represented and nested attributes modules in ActiveData are having such a method redefiniions. Both are prepended to the Granite
action, so we have to prepend our patch as well in order to put it above all other, so it will handle the attributes first.
Public Instance Methods
assign_attributes(attributes)
click to toggle source
Calls superclass method
# File lib/granite/action.rb, line 34 def assign_attributes(attributes) attributes = attributes.to_unsafe_hash if attributes.respond_to?(:to_unsafe_hash) attributes = attributes.stringify_keys attributes = attributes.merge(attributes.delete(model_name.param_key)) if attributes.key?(model_name.param_key) super(attributes) end