Permalink
Browse files

Move #encode_with to Relation

  • Loading branch information...
1 parent b8e8096 commit ef8cae60ee330f760e35f7c2ed9497b6918587f9 @goddamnhippie goddamnhippie committed Jul 15, 2014
@@ -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
@@ -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.