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/new_base/conditional_get.rb | 2 +- actionpack/lib/action_controller/new_base/helpers.rb | 2 +- actionpack/lib/action_controller/new_base/layouts.rb | 4 ++-- actionpack/lib/action_controller/new_base/render_options.rb | 10 +++++----- actionpack/lib/action_controller/new_base/renderer.rb | 2 +- actionpack/lib/action_controller/new_base/session.rb | 2 +- actionpack/lib/action_controller/new_base/testing.rb | 2 +- actionpack/lib/action_controller/new_base/url_for.rb | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) (limited to 'actionpack/lib/action_controller/new_base') diff --git a/actionpack/lib/action_controller/new_base/conditional_get.rb b/actionpack/lib/action_controller/new_base/conditional_get.rb index 8bd6db500b..d287ec4994 100644 --- a/actionpack/lib/action_controller/new_base/conditional_get.rb +++ b/actionpack/lib/action_controller/new_base/conditional_get.rb @@ -2,7 +2,7 @@ module ActionController module ConditionalGet extend ActiveSupport::Concern - depends_on RackConvenience + include RackConvenience # Sets the etag, last_modified, or both on the response and renders a # "304 Not Modified" response if the request is already fresh. diff --git a/actionpack/lib/action_controller/new_base/helpers.rb b/actionpack/lib/action_controller/new_base/helpers.rb index c2ebd343e3..e8000be87b 100644 --- a/actionpack/lib/action_controller/new_base/helpers.rb +++ b/actionpack/lib/action_controller/new_base/helpers.rb @@ -6,7 +6,7 @@ module ActionController module Helpers extend ActiveSupport::Concern - depends_on AbstractController::Helpers + include AbstractController::Helpers included do # Set the default directory for helpers diff --git a/actionpack/lib/action_controller/new_base/layouts.rb b/actionpack/lib/action_controller/new_base/layouts.rb index 727358c394..0ff71587d6 100644 --- a/actionpack/lib/action_controller/new_base/layouts.rb +++ b/actionpack/lib/action_controller/new_base/layouts.rb @@ -2,8 +2,8 @@ module ActionController module Layouts extend ActiveSupport::Concern - depends_on ActionController::Renderer - depends_on AbstractController::Layouts + include ActionController::Renderer + include AbstractController::Layouts module ClassMethods def _implied_layout_name diff --git a/actionpack/lib/action_controller/new_base/render_options.rb b/actionpack/lib/action_controller/new_base/render_options.rb index 04b954134f..fc9a02626f 100644 --- a/actionpack/lib/action_controller/new_base/render_options.rb +++ b/actionpack/lib/action_controller/new_base/render_options.rb @@ -39,7 +39,7 @@ module ActionController module RenderOption #:nodoc: def self.extended(base) base.extend ActiveSupport::Concern - base.depends_on ::ActionController::RenderOptions + base.send :include, ::ActionController::RenderOptions def base.register_renderer(name) included { _add_render_option(name) } @@ -94,10 +94,10 @@ module ActionController module All extend ActiveSupport::Concern - depends_on ActionController::Renderers::Json - depends_on ActionController::Renderers::Js - depends_on ActionController::Renderers::Xml - depends_on ActionController::Renderers::RJS + include ActionController::Renderers::Json + include ActionController::Renderers::Js + include ActionController::Renderers::Xml + include ActionController::Renderers::RJS end end end diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index e132d4fdbb..2fab501302 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -2,7 +2,7 @@ module ActionController module Renderer extend ActiveSupport::Concern - depends_on AbstractController::Renderer + include AbstractController::Renderer def process_action(*) self.formats = request.formats.map {|x| x.to_sym} diff --git a/actionpack/lib/action_controller/new_base/session.rb b/actionpack/lib/action_controller/new_base/session.rb index a585630230..bcedd6e1c7 100644 --- a/actionpack/lib/action_controller/new_base/session.rb +++ b/actionpack/lib/action_controller/new_base/session.rb @@ -2,7 +2,7 @@ module ActionController module Session extend ActiveSupport::Concern - depends_on RackConvenience + include RackConvenience def session @_request.session diff --git a/actionpack/lib/action_controller/new_base/testing.rb b/actionpack/lib/action_controller/new_base/testing.rb index e8d210d149..a4a1116d9e 100644 --- a/actionpack/lib/action_controller/new_base/testing.rb +++ b/actionpack/lib/action_controller/new_base/testing.rb @@ -2,7 +2,7 @@ module ActionController module Testing extend ActiveSupport::Concern - depends_on RackConvenience + include RackConvenience # OMG MEGA HAX def process_with_new_base_test(request, response) diff --git a/actionpack/lib/action_controller/new_base/url_for.rb b/actionpack/lib/action_controller/new_base/url_for.rb index 902cac4d15..7119c14cd3 100644 --- a/actionpack/lib/action_controller/new_base/url_for.rb +++ b/actionpack/lib/action_controller/new_base/url_for.rb @@ -2,7 +2,7 @@ module ActionController module UrlFor extend ActiveSupport::Concern - depends_on RackConvenience + include RackConvenience def process_action(*) initialize_current_url -- cgit v1.2.3