Method: ActiveRecord::MessagePack::Decoder#build_record
- Defined in:
- activerecord/lib/active_record/message_pack.rb
#build_record(entry) ⇒ Object
104 105 106 107 108 109 |
# File 'activerecord/lib/active_record/message_pack.rb', line 104 def build_record(entry) class_name, attributes_hash, is_new_record, * = entry klass = ActiveSupport::MessagePack::Extensions.load_class(class_name) attributes = klass.attributes_builder.build_from_database(attributes_hash) klass.allocate.init_with_attributes(attributes, is_new_record) end |