diff options
author | José Valim <jose.valim@gmail.com> | 2010-04-22 12:12:38 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-04-22 12:12:38 +0200 |
commit | 81fb742488e696ee7a7a8b1a620bc93deb1fad77 (patch) | |
tree | 8a82b9f279fc731f4e7a6d68179b8fd6bb9e38fb /actionpack/lib/action_controller/metal | |
parent | 4163ccec2343ee66e2488f067eab2a15260e1219 (diff) | |
download | rails-81fb742488e696ee7a7a8b1a620bc93deb1fad77.tar.gz rails-81fb742488e696ee7a7a8b1a620bc93deb1fad77.tar.bz2 rails-81fb742488e696ee7a7a8b1a620bc93deb1fad77.zip |
Always downstream given options in :json, :xml and :js renderers and add tests for it.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r-- | actionpack/lib/action_controller/metal/renderers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb index 47759aa2fe..0be07cd1fc 100644 --- a/actionpack/lib/action_controller/metal/renderers.rb +++ b/actionpack/lib/action_controller/metal/renderers.rb @@ -79,12 +79,12 @@ module ActionController add :js do |js, options| self.content_type ||= Mime::JS - self.response_body = js.respond_to?(:to_js) ? js.to_js : js + self.response_body = js.respond_to?(:to_js) ? js.to_js(options) : js end add :xml do |xml, options| self.content_type ||= Mime::XML - self.response_body = xml.respond_to?(:to_xml) ? xml.to_xml : xml + self.response_body = xml.respond_to?(:to_xml) ? xml.to_xml(options) : xml end add :update do |proc, options| |