method

marshal_load

Importance_0
v8.0.0 - Show latest stable - 0 notes - Class: Methods
marshal_load(state) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/marshalling.rb, line 43
      def marshal_load(state)
        attributes_from_database, new_record, associations = state

        attributes = self.class.attributes_builder.build_from_database(attributes_from_database)
        init_with_attributes(attributes, new_record)

        if associations
          associations.each do |name, target|
            association(name).target = target
          rescue ActiveRecord::AssociationNotFoundError
            # the association no longer exist, we can just skip it.
          end
        end
      end
Register or log in to add new notes.