method

convert

rails latest stable - Class: ActiveRecord::LegacyYamlAdapter::Rails41

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v6.1.7.7) is shown here.

convert(klass, coder)
public

No documentation available.

# File activerecord/lib/active_record/legacy_yaml_adapter.rb, line 40
      def self.convert(klass, coder)
        attributes = klass.attributes_builder
          .build_from_database(coder["attributes"])
        new_record = coder["attributes"][klass.primary_key].blank?

        {
          "attributes" => attributes,
          "new_record" => new_record,
        }
      end