aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/new_base/renderer.rb
diff options
context:
space:
mode:
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, 11 insertions, 12 deletions
diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb
index be4ea54c3b..d7ea9ec4a5 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,18 +34,17 @@ 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]
@@ -54,7 +53,7 @@ module ActionController
else text.to_s
end
end
-
+
def _process_options(options)
if status = options[:status]
response.status = status.to_i