From 2854535b02bcee3668bda02c76c3105fc24730d3 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 7 May 2009 10:29:22 -0500 Subject: Make module dependency DSL opt in --- actionpack/lib/action_controller/new_base/renderer.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'actionpack/lib/action_controller/new_base/renderer.rb') diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index ed34c46aed..be4ea54c3b 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -1,5 +1,7 @@ module ActionController module Renderer + extend ActiveSupport::DependencyModule + depends_on AbstractController::Renderer def initialize(*) -- cgit v1.2.3 From a747ab5b20b9d543e9d311070e3b720c761ae716 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Thu, 7 May 2009 10:45:29 -0500 Subject: Whitespace! --- .../lib/action_controller/new_base/renderer.rb | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'actionpack/lib/action_controller/new_base/renderer.rb') 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 -- cgit v1.2.3 From 0cac68d3bed3e6bf8ec2eb994858e4a179046941 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Mon, 11 May 2009 15:03:24 -0700 Subject: Revert "Whitespace!" This reverts commit a747ab5b20b9d543e9d311070e3b720c761ae716. --- .../lib/action_controller/new_base/renderer.rb | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'actionpack/lib/action_controller/new_base/renderer.rb') 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 -- cgit v1.2.3