This warning shows up for me (for everyone) in the majority of controller tests. I know its just a warning...for now...until 5 is released. I am unsure what I need to change to comply with this deprecation. What has changed with serialized_attributes? Id like to make this warning go away and improve my code in prep for 5.0...but unsure how to proceed. Thanks.
When hitting a standard update action from a controller test...I get the error:
@document.update_attributes(document_params)
in the test (condensed for this example):
before do
@document = documents(:drivers_license)
end
def valid_params
{ name: 'Passport' }
end
it "must update document" do
put :update, id: @document, document: valid_params
assert_redirected_to documents_path
end
This test passes, but now in rails 4.2 puts the error: DEPRECATION WARNING: serialized_attributes
is deprecated without replacement, and will be removed in Rails 5.0."
So, in this example...are the serialized_attributes "{ name: 'Passport' }"?
Are you perhaps using the paper_trail gem? If so, see issue #416 in that project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With