method

becomes!

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveRecord::Persistence
becomes!(klass) public

Wrapper around #becomes that also changes the instance’s STI column value. This is especially useful if you want to persist the changed class in your database.

Note: The old instance’s STI column value will be changed too, as both objects share the same set of attributes.

Show source
Register or log in to add new notes.