From 669fd84910586d4c791b6f5bf4320f68ac7845aa Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 29 May 2009 17:03:23 -0500 Subject: AS::Concern redefines "include" to lazy include modules as dependencies --- actionpack/lib/action_controller/base/chained/flash.rb | 2 +- actionpack/lib/action_controller/base/filter_parameter_logging.rb | 6 ++---- actionpack/lib/action_controller/base/request_forgery_protection.rb | 2 +- actionpack/lib/action_controller/base/streaming.rb | 2 +- actionpack/lib/action_controller/base/verification.rb | 2 +- 5 files changed, 6 insertions(+), 8 deletions(-) (limited to 'actionpack/lib/action_controller/base') diff --git a/actionpack/lib/action_controller/base/chained/flash.rb b/actionpack/lib/action_controller/base/chained/flash.rb index 04d27bf090..42c6e430ca 100644 --- a/actionpack/lib/action_controller/base/chained/flash.rb +++ b/actionpack/lib/action_controller/base/chained/flash.rb @@ -29,7 +29,7 @@ module ActionController #:nodoc: extend ActiveSupport::Concern # TODO : Remove the defined? check when new base is the main base - depends_on Session if defined?(ActionController::Http) + include Session if defined?(ActionController::Http) included do # TODO : Remove the defined? check when new base is the main base diff --git a/actionpack/lib/action_controller/base/filter_parameter_logging.rb b/actionpack/lib/action_controller/base/filter_parameter_logging.rb index 9df286ee24..8370ba6fc0 100644 --- a/actionpack/lib/action_controller/base/filter_parameter_logging.rb +++ b/actionpack/lib/action_controller/base/filter_parameter_logging.rb @@ -4,13 +4,11 @@ module ActionController # TODO : Remove the defined? check when new base is the main base if defined?(ActionController::Http) - depends_on AbstractController::Logger + include AbstractController::Logger end included do - if defined?(ActionController::Http) - include InstanceMethodsForNewBase - end + include InstanceMethodsForNewBase end module ClassMethods diff --git a/actionpack/lib/action_controller/base/request_forgery_protection.rb b/actionpack/lib/action_controller/base/request_forgery_protection.rb index 368c6e9de8..a470c8eec1 100644 --- a/actionpack/lib/action_controller/base/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/base/request_forgery_protection.rb @@ -7,7 +7,7 @@ module ActionController #:nodoc: # TODO : Remove the defined? check when new base is the main base if defined?(ActionController::Http) - depends_on AbstractController::Helpers, Session + include AbstractController::Helpers, Session end included do diff --git a/actionpack/lib/action_controller/base/streaming.rb b/actionpack/lib/action_controller/base/streaming.rb index 5f56c95483..73d4bde6c1 100644 --- a/actionpack/lib/action_controller/base/streaming.rb +++ b/actionpack/lib/action_controller/base/streaming.rb @@ -6,7 +6,7 @@ module ActionController #:nodoc: # TODO : Remove the defined? check when new base is the main base if defined?(ActionController::Http) - depends_on ActionController::Renderer + include ActionController::Renderer end DEFAULT_SEND_FILE_OPTIONS = { diff --git a/actionpack/lib/action_controller/base/verification.rb b/actionpack/lib/action_controller/base/verification.rb index 31654e36f3..d87b348ed4 100644 --- a/actionpack/lib/action_controller/base/verification.rb +++ b/actionpack/lib/action_controller/base/verification.rb @@ -4,7 +4,7 @@ module ActionController #:nodoc: # TODO : Remove the defined? check when new base is the main base if defined?(ActionController::Http) - depends_on AbstractController::Callbacks, Session, Flash, Renderer + include AbstractController::Callbacks, Session, Flash, Renderer end # This module provides a class-level method for specifying that certain -- cgit v1.2.3