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:
parent
259bf87560
commit
a01de4deab
1 changed files with 2 additions and 0 deletions
|
@ -356,6 +356,8 @@ module ActiveRecord
|
|||
@new_record = false
|
||||
@attributes = attributes
|
||||
|
||||
self.class.define_attribute_methods
|
||||
|
||||
yield self if block_given?
|
||||
|
||||
_run_find_callbacks
|
||||
|
|
Loading…
Reference in a new issue