diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-16 15:44:01 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-07-16 15:44:01 -0300 |
commit | df8b021102d96e5ccadc9a633e846bb33c8466c6 (patch) | |
tree | 9bdd07a478f504602b43ddfd5e750c0a4ce97487 /activerecord/lib | |
parent | 90f0cdc906fcec77937363c87cba45f3802ac858 (diff) | |
parent | ef8cae60ee330f760e35f7c2ed9497b6918587f9 (diff) | |
download | rails-df8b021102d96e5ccadc9a633e846bb33c8466c6.tar.gz rails-df8b021102d96e5ccadc9a633e846bb33c8466c6.tar.bz2 rails-df8b021102d96e5ccadc9a633e846bb33c8466c6.zip |
Merge pull request #16183 from goddamnhippie/fix-psych-warning
Implement required #encode_with
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index cef40be7ce..ad54d84665 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -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 |