1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

define attribute methods in init_from_db

Now that `allocate` is removed, we need to define attribute methods in
all "init" methods.
This commit is contained in:
Aaron Patterson 2018-06-26 10:25:19 -07:00
parent 259bf87560
commit a01de4deab
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

View file

@ -356,6 +356,8 @@ module ActiveRecord
@new_record = false
@attributes = attributes
self.class.define_attribute_methods
yield self if block_given?
_run_find_callbacks