diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-06-23 10:05:30 -0400 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-23 18:00:25 +0200 |
commit | eb04408a20628a49296e0859425940b39a83ec63 (patch) | |
tree | e4d9aaeebb612b9a41fc5873a78c318e27d2eaf3 /activerecord/lib/active_record | |
parent | a3ce6fcc567836c99bb93cbe880b2c333a511593 (diff) | |
download | rails-eb04408a20628a49296e0859425940b39a83ec63.tar.gz rails-eb04408a20628a49296e0859425940b39a83ec63.tar.bz2 rails-eb04408a20628a49296e0859425940b39a83ec63.zip |
ActiveRecord's relation object should respond to to_json and to_yaml
[#4547 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb index 66970a5ea1..a342b1fe6f 100644 --- a/activerecord/lib/active_record/relation.rb +++ b/activerecord/lib/active_record/relation.rb @@ -10,7 +10,7 @@ module ActiveRecord include FinderMethods, Calculations, SpawnMethods, QueryMethods, Batches - delegate :length, :collect, :map, :each, :all?, :include?, :to => :to_a + delegate :to_json, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to => :to_a delegate :insert, :to => :arel attr_reader :table, :klass |