module ActiveRecord::LegacyYamlAdapter::Rails41 - activerecord-4.2.5.2 Documentation

# module ActiveRecord::LegacyYamlAdapter::Rails41

### Public Class Methods

convert(klass, coder) click to toggle source

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