aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/base.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-21 14:22:07 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-21 14:34:56 -0700
commite693f45e155a81b6c337b8766870b56716a05105 (patch)
tree176d94bdc8aa6e072666f1a1ef9383ff809a18df /actionpack/lib/action_controller/new_base/base.rb
parent386ff66e5ed4fbe1e060610d4226a4eb22dca766 (diff)
downloadrails-e693f45e155a81b6c337b8766870b56716a05105.tar.gz
rails-e693f45e155a81b6c337b8766870b56716a05105.tar.bz2
rails-e693f45e155a81b6c337b8766870b56716a05105.zip
Remove some response content type concepts from ActionView
Diffstat (limited to 'actionpack/lib/action_controller/new_base/base.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/base.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/new_base/base.rb b/actionpack/lib/action_controller/new_base/base.rb
index 142699326e..b8674d5099 100644
--- a/actionpack/lib/action_controller/new_base/base.rb
+++ b/actionpack/lib/action_controller/new_base/base.rb
@@ -70,7 +70,7 @@ module ActionController
end
end
- def render_to_body(action = nil, options = {})
+ def _normalize_options(action = nil, options = {})
if action.is_a?(Hash)
options, action = action, nil
elsif action.is_a?(String) || action.is_a?(Symbol)
@@ -87,9 +87,21 @@ module ActionController
if options.key?(:action) && options[:action].to_s.index("/")
options[:template] = options.delete(:action)
end
-
- # options = {:template => options.to_s} if options.is_a?(String) || options.is_a?(Symbol)
- super(options) || " "
+ options
+ end
+
+ def render(action = nil, options = {})
+ options = _normalize_options(action, options)
+ super(options)
+ end
+
+ def render_to_string(action = nil, options = {})
+ options = _normalize_options(action, options)
+ super(options)
+ end
+
+ def render_to_body(options)
+ super || [" "]
end
# Redirects the browser to the target specified in +options+. This parameter can take one of three forms: