aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/renderer.rb
diff options
context:
space:
mode:
authorYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-11 15:03:24 -0700
committerYehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>2009-05-11 15:03:24 -0700
commit0cac68d3bed3e6bf8ec2eb994858e4a179046941 (patch)
tree6f6d89a9bf66064e4acb8392d54648b4bf37f9f0 /actionpack/lib/action_controller/new_base/renderer.rb
parentddbeb15a5e7e0c3c5f316ccf65b557bc5311a6c4 (diff)
downloadrails-0cac68d3bed3e6bf8ec2eb994858e4a179046941.tar.gz
rails-0cac68d3bed3e6bf8ec2eb994858e4a179046941.tar.bz2
rails-0cac68d3bed3e6bf8ec2eb994858e4a179046941.zip
Revert "Whitespace!"
This reverts commit a747ab5b20b9d543e9d311070e3b720c761ae716.
Diffstat (limited to 'actionpack/lib/action_controller/new_base/renderer.rb')
-rw-r--r--actionpack/lib/action_controller/new_base/renderer.rb23
1 files changed, 12 insertions, 11 deletions
diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb
index d7ea9ec4a5..be4ea54c3b 100644
--- a/actionpack/lib/action_controller/new_base/renderer.rb
+++ b/actionpack/lib/action_controller/new_base/renderer.rb
@@ -3,22 +3,22 @@ module ActionController
extend ActiveSupport::DependencyModule
depends_on AbstractController::Renderer
-
+
def initialize(*)
self.formats = [:html]
super
end
-
+
def render(action, options = {})
# TODO: Move this into #render_to_body
if action.is_a?(Hash)
- options, action = action, nil
+ options, action = action, nil
else
options.merge! :action => action
end
-
+
_process_options(options)
-
+
self.response_body = render_to_body(options)
end
@@ -34,17 +34,18 @@ module ActionController
options[:_template_name] = options[:template]
elsif options.key?(:action)
options[:_template_name] = options[:action].to_s
- options[:_prefix] = _prefix
+ options[:_prefix] = _prefix
end
-
+
super(options)
end
-
+
private
+
def _prefix
controller_path
- end
-
+ end
+
def _text(options)
text = options[:text]
@@ -53,7 +54,7 @@ module ActionController
else text.to_s
end
end
-
+
def _process_options(options)
if status = options[:status]
response.status = status.to_i