diff options
author | José Valim <jose.valim@gmail.com> | 2009-08-13 10:27:41 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-08-13 10:27:41 +0200 |
commit | 4f9047ecc8f0e2c3d4491bae0051679569da71dc (patch) | |
tree | d6ee2c4f473b4ef5558e7d01325f7be5d5ce9ec7 /actionpack/test/lib | |
parent | 5f7cfffc5377824e03432d7773ed8864a872b18c (diff) | |
download | rails-4f9047ecc8f0e2c3d4491bae0051679569da71dc.tar.gz rails-4f9047ecc8f0e2c3d4491bae0051679569da71dc.tar.bz2 rails-4f9047ecc8f0e2c3d4491bae0051679569da71dc.zip |
Ensure collections are not treated as nested resources.
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r-- | actionpack/test/lib/controller/fake_models.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index 0faf8f3f9a..18eff7516b 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -10,12 +10,16 @@ class Customer < Struct.new(:name, :id) id.to_s end - def to_xml - "XML" + def to_xml(options={}) + if options[:builder] + options[:builder].name name + else + "<name>#{name}</name>" + end end - def to_js - "JS" + def to_js(options={}) + "name: #{name.inspect}" end def errors |