Module: ActiveRecord::LegacyYamlAdapter

Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/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 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/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