makandra / active_type

Make any Ruby object quack like ActiveRecord
MIT License
1.09k stars 74 forks source link

Active type cast should update sti column #100

Closed denzelem closed 7 years ago

denzelem commented 7 years ago

Fixes #99 .

foobear commented 7 years ago

Thanks for looking into this.

However, ActiveType.cast now changes the type of the source record, like ActiveRecord#becomes! would. I believe that should not happen.

kratob commented 7 years ago

I don't think this can be avoided. The source and "target" record share all attributes, including #type.