Module: ActiveRecord::LegacyYamlAdapter

Defined in:
activerecord/lib/active_record/legacy_yaml_adapter.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.convert(coder) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'activerecord/lib/active_record/legacy_yaml_adapter.rb', line 5

def self.convert(coder)
  return coder unless coder.is_a?(Psych::Coder)

  case coder["active_record_yaml_version"]
  when 1, 2 then coder
  else
    raise("Active Record doesn't know how to load YAML with this format.")
  end
end