Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move #encode_with to Relation

  • Loading branch information...
commit ef8cae60ee330f760e35f7c2ed9497b6918587f9 1 parent b8e8096
@goddamnhippie goddamnhippie authored
View
5 activerecord/lib/active_record/relation.rb
@@ -242,6 +242,11 @@ def to_a
@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
View
4 activerecord/lib/active_record/relation/delegation.rb
@@ -119,10 +119,6 @@ def respond_to?(method, include_private = false)
arel.respond_to?(method, include_private)
end
- def encode_with(coder)
- coder.represent_seq(nil, to_a)
- end
-
protected
def array_delegable?(method)

0 comments on commit ef8cae6

Please sign in to comment.
Something went wrong with that request. Please try again.