diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2018-06-26 10:25:19 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2018-06-26 10:25:19 -0700 |
commit | a01de4deab59f57874965a69e9a4c83112b3cb47 (patch) | |
tree | 3dab7cfaeb4b9e8dcbe02065e659f7ba4dd393d3 /activerecord/lib | |
parent | 259bf87560aa556734f4f8ab16a99c4237872b20 (diff) | |
download | rails-a01de4deab59f57874965a69e9a4c83112b3cb47.tar.gz rails-a01de4deab59f57874965a69e9a4c83112b3cb47.tar.bz2 rails-a01de4deab59f57874965a69e9a4c83112b3cb47.zip |
define attribute methods in `init_from_db`
Now that `allocate` is removed, we need to define attribute methods in
all "init" methods.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/core.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/core.rb b/activerecord/lib/active_record/core.rb index 20d9e7a9ca..df795df52e 100644 --- a/activerecord/lib/active_record/core.rb +++ b/activerecord/lib/active_record/core.rb @@ -356,6 +356,8 @@ module ActiveRecord @new_record = false @attributes = attributes + self.class.define_attribute_methods + yield self if block_given? _run_find_callbacks |