How to ‘depp_merge!’ this
# @user
<User id: nil, name: "Test name", surname: "Test surname", email: nil, password: nil>
with this
# @hash
{"name"=>"Test name", "surname"=>"Test surname", "email"=>"test_emaild@test.test", "password"=>nil, "test_attribute"=>"Test attribute name"}
?
I tryed this @user.attributes.deep_merge!(@hash) but doesn’t work.
This is what
@user.update_attributes(@hash)is for. If that doesn’t do what you need, please update your question to include what you expect for the output.update_attributes docs