# module ActiveRecord::LegacyYamlAdapter::Rails41

### Public Class Methods

convert(klass, coder) click to toggle source

    # File lib/active_record/legacy_yaml_adapter.rb, line 34
    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