From cbb0724f0d0d51a8097ba707517dcf1d09b07a31 Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 26 May 2009 12:06:48 -0700 Subject: In new base Rails2Compatibility, move @template assignment to right before the first action is processed. --- actionpack/lib/action_controller/new_base/compatibility.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_controller/new_base/compatibility.rb b/actionpack/lib/action_controller/new_base/compatibility.rb index 4245ba982b..646e69843e 100644 --- a/actionpack/lib/action_controller/new_base/compatibility.rb +++ b/actionpack/lib/action_controller/new_base/compatibility.rb @@ -69,7 +69,12 @@ module ActionController # TODO: Remove this after we flip def template - _action_view + @template ||= _action_view + end + + def process_action(*) + template + super end module ClassMethods @@ -83,11 +88,6 @@ module ActionController @@cache_store = ActiveSupport::Cache.lookup_store(store_option) end end - - def initialize(*) - super - @template = _action_view - end def render_to_body(options) if options.is_a?(Hash) && options.key?(:template) -- cgit v1.2.3