adding fix for to_xml for ActiveRecord relation object
Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
parent
eb04408a20
commit
0bf3baa6b3
@ -10,7 +10,7 @@ class Relation
|
||||
|
||||
include FinderMethods, Calculations, SpawnMethods, QueryMethods, Batches
|
||||
|
||||
delegate :to_json, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to => :to_a
|
||||
delegate :to_xml, :to_json, :to_yaml, :length, :collect, :map, :each, :all?, :include?, :to => :to_a
|
||||
delegate :insert, :to => :arel
|
||||
|
||||
attr_reader :table, :klass
|
||||
|
@ -39,6 +39,11 @@ def test_to_yaml
|
||||
assert_nothing_raised { Bird.scoped.all.to_yaml }
|
||||
end
|
||||
|
||||
def test_to_xml
|
||||
assert_nothing_raised { Bird.scoped.to_xml }
|
||||
assert_nothing_raised { Bird.scoped.all.to_xml }
|
||||
end
|
||||
|
||||
def test_scoped_all
|
||||
topics = Topic.scoped.all
|
||||
assert_kind_of Array, topics
|
||||
|
Loading…
Reference in New Issue
Block a user