Reputation: 209
When I try to Update a model , I am getting the following deprecated warning
DEPRECATION WARNING: `serialized_attributes` is deprecated without replacement, and will be removed in Rails 5.0.
And here is my controller sample method
def update
@test = Test.unscoped.find(params[:id])
@test.name = params[:test][:name]
@test.abbreviation = params[:test][:abbreviation]
if @test.save
redirect_to action: :index
else
@test.errors.delete(:cover_image_content_type)
flash[:error] = @test.errors.messages.to_yaml
redirect_to action: :show
end
end
Note: Also I have has_paper_trail version: :paper_trail_version in my test model. How to fix this deprecation, which will support when i upgrade to Rails 5?
Upvotes: 0
Views: 426
Reputation: 2478
Looks like upgrading paper_trail to newer version will fix it, based on this github issue
Upvotes: 1