mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Implement required #encode_with
While running the spec `ARCONN=mysql2 ruby -v -Itest test/cases/yaml_serialization_test.rb` the following warning shows up: `implementing to_yaml is deprecated, please implement "encode_with"`
This commit is contained in:
parent
c3f4d6c8fe
commit
b8e8096a89
2 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,10 @@ module ActiveRecord
|
|||
arel.respond_to?(method, include_private)
|
||||
end
|
||||
|
||||
def encode_with(coder)
|
||||
coder.represent_seq(nil, to_a)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def array_delegable?(method)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
require 'cases/helper'
|
||||
require 'models/topic'
|
||||
require 'models/reply'
|
||||
require 'models/post'
|
||||
require 'models/author'
|
||||
|
||||
|
|
Loading…
Reference in a new issue