diff options
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 8 | ||||
-rw-r--r-- | actionpack/lib/action_controller/components.rb | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 55e1d48949..32c1dcbcaf 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -548,12 +548,16 @@ module ActionController #:nodoc: @@guard.synchronize { send(method, *arguments) } end - response.prepare! unless component_request? - response + send_response ensure process_cleanup end + def send_response + response.prepare! unless component_request? + response + end + # Returns a URL that has been rewritten according to the options hash and the defined Routes. # (For doing a complete redirect, use redirect_to). # diff --git a/actionpack/lib/action_controller/components.rb b/actionpack/lib/action_controller/components.rb index 8275bd380a..a9b4559852 100644 --- a/actionpack/lib/action_controller/components.rb +++ b/actionpack/lib/action_controller/components.rb @@ -38,6 +38,7 @@ module ActionController #:nodoc: def self.included(base) #:nodoc: base.class_eval do include InstanceMethods + include ActiveSupport::Deprecation extend ClassMethods helper HelperMethods @@ -82,6 +83,7 @@ module ActionController #:nodoc: render_for_text(component_response(options, true).body, response.headers["Status"]) end end + deprecate :render_component => "Please install render_component plugin from http://github.com/rails/render_component/tree/master" # Returns the component response as a string def render_component_as_string(options) #:doc: @@ -95,6 +97,7 @@ module ActionController #:nodoc: end end end + deprecate :render_component_as_string => "Please install render_component plugin from http://github.com/rails/render_component/tree/master" def flash_with_components(refresh = false) #:nodoc: if !defined?(@_flash) || refresh |