module ActiveRecord::LegacyYamlAdapter - activerecord-4.2.5.2 Documentation

# module ActiveRecord::LegacyYamlAdapter

### Public Class Methods

convert(klass, coder) click to toggle source

    # File lib/active_record/legacy_yaml_adapter.rb, line 3
    def self.convert(klass, coder)
      return coder unless coder.is_a?(Psych::Coder)

      case coder["active_record_yaml_version"]
      when 0 then coder
      else
        if coder["attributes"].is_a?(AttributeSet)
          coder
        else
          Rails41.convert(klass, coder)
        end
      end
    end