1
0
Fork 0
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:
Gustavo Beathyate 2014-07-15 15:50:29 -05:00
parent c3f4d6c8fe
commit b8e8096a89
2 changed files with 5 additions and 0 deletions

View file

@ -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)

View file

@ -1,5 +1,6 @@
require 'cases/helper'
require 'models/topic'
require 'models/reply'
require 'models/post'
require 'models/author'