Skip to content

Attributes don't play nicely with ActiveModel::Dirty in Rails 6 #529

Open
@edtjones

Description

@edtjones

We've hit a problem on a project where the functionality of ActiveModel::Dirty has changed, such that the following no longer works for a Her-backed model:

foo = SomeModel.find(1)
foo.title # returns a string
foo.title = 'bar'
foo.restore_title! #should restore the title; actually fails because foo.title is a String and Rails 6 expects it to respond to `original_value`.

Haven't done enough digging to determine the best course of action for fixing, yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions