mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Move #encode_with to Relation
This commit is contained in:
parent
b8e8096a89
commit
ef8cae60ee
2 changed files with 5 additions and 4 deletions
|
@ -242,6 +242,11 @@ module ActiveRecord
|
|||
@records
|
||||
end
|
||||
|
||||
# Serializes the relation objects Array.
|
||||
def encode_with(coder)
|
||||
coder.represent_seq(nil, to_a)
|
||||
end
|
||||
|
||||
def as_json(options = nil) #:nodoc:
|
||||
to_a.as_json(options)
|
||||
end
|
||||
|
|
|
@ -119,10 +119,6 @@ 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)
|
||||
|
|
Loading…
Reference in a new issue