remi / her

Her is an ORM (Object Relational Mapper) that maps REST resources to Ruby objects. It is designed to build applications that are powered by a RESTful API instead of a database.
MIT License
2.05k stars 322 forks source link

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

Open edtjones opened 4 years ago

edtjones commented 4 years ago

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.