aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib/controller/fake_models.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-08-14 12:34:38 -0300
committerEmilio Tagua <miloops@gmail.com>2009-08-14 12:34:38 -0300
commit48c1e6d584409d774b184e0f4d2ef28e5b0e9c90 (patch)
treea2becf0cce37a47579e848780b02f420d335ccd9 /actionpack/test/lib/controller/fake_models.rb
parent9ac01fad193b27e517ea772e0d1e13e06f4ddf34 (diff)
parentc6bc8e662614be711f45a8d4b231d5f993b024a7 (diff)
downloadrails-48c1e6d584409d774b184e0f4d2ef28e5b0e9c90.tar.gz
rails-48c1e6d584409d774b184e0f4d2ef28e5b0e9c90.tar.bz2
rails-48c1e6d584409d774b184e0f4d2ef28e5b0e9c90.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/test/lib/controller/fake_models.rb')
-rw-r--r--actionpack/test/lib/controller/fake_models.rb12
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