diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-09 13:07:30 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-09 13:07:30 -0300 |
commit | 6c7d8cb8ac9e6b6775e9a54ef0be62dbaab592f5 (patch) | |
tree | c169325ddd18aedd18c66f22a53ba04190a0a41e /actionpack/lib/action_controller/new_base/renderer.rb | |
parent | 8885b2d6c1855742600d0afdb9dfc002acb62e5e (diff) | |
parent | 8ee0c598dbe3f9fd133e85c69c6e43f62056646c (diff) | |
download | rails-6c7d8cb8ac9e6b6775e9a54ef0be62dbaab592f5.tar.gz rails-6c7d8cb8ac9e6b6775e9a54ef0be62dbaab592f5.tar.bz2 rails-6c7d8cb8ac9e6b6775e9a54ef0be62dbaab592f5.zip |
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/lib/action_controller/new_base/renderer.rb')
-rw-r--r-- | actionpack/lib/action_controller/new_base/renderer.rb | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index ed34c46aed..d7ea9ec4a5 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -1,22 +1,24 @@ module ActionController module Renderer + 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 @@ -32,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] @@ -52,7 +53,7 @@ module ActionController else text.to_s end end - + def _process_options(options) if status = options[:status] response.status = status.to_i |