I propose that initialize values in `becomes` method
for example,
class Book < ApplicationRecord
end
class PaperBook < Book
after_initialize do |boo|
material ||= "paper"
end
end
> book = Book.new
> book.material
# => nil
> book.becomes!(PaperBook).materal
# => "paper"
Shoul I implement the feature?
Does it make sense?
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.