diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/configuration.rb | 20 | ||||
-rw-r--r-- | railties/lib/rails/core.rb | 3 | ||||
-rw-r--r-- | railties/lib/rails/plugin.rb | 20 |
3 files changed, 3 insertions, 40 deletions
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index cb321536d2..086f67a419 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -1,24 +1,6 @@ require 'active_support/ordered_options' module Rails - # Create a Plugin::Options from ActiveSuppot::OrderedOptions, - # which support the following syntax: - # - # controller.action_controller.include FooBar - # - class Plugin::Options < ActiveSupport::OrderedOptions #:nodoc: - attr_reader :includes - - def initialize(*args) - @includes = [] - super - end - - def include(*args) - @includes.concat(args) - end - end - # Temporarily separate the plugin configuration class from the main # configuration class while this bit is being cleaned up. class Plugin::Configuration @@ -34,7 +16,7 @@ module Rails @options = base.options.dup @middleware = base.middleware.dup else - @options = Hash.new { |h,k| h[k] = Rails::Plugin::Options.new } + @options = Hash.new { |h,k| h[k] = ActiveSupport::OrderedOptions.new } @middleware = ActionDispatch::MiddlewareStack.new end end diff --git a/railties/lib/rails/core.rb b/railties/lib/rails/core.rb index c819e90dd7..ab95edc676 100644 --- a/railties/lib/rails/core.rb +++ b/railties/lib/rails/core.rb @@ -12,7 +12,6 @@ require 'rails/railties_path' require 'rails/version' require 'rails/rack' require 'rails/paths' -require 'rails/core' require 'rails/configuration' require 'rails/deprecation' require 'rails/ruby_version_check' @@ -103,4 +102,4 @@ module Rails @@public_path = path end end -end
\ No newline at end of file +end diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index c64042cf7d..e154e9b706 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -40,24 +40,6 @@ module Rails rake_tasks.each { |blk| blk.call } end - # Creates an initializer which includes all given modules to the given class. - # - # module Rails - # class ActionController < Rails::Plugin - # plugin_name :action_controller - # include_modules_in "ActionController::Base" - # end - # end - # - def self.include_modules_in(klass, from=plugin_name) - self.initializer :"#{from}.include_modules" do |app| - klass = klass.constantize if klass.is_a?(String) - app.config.send(from).includes.each do |mod| - klass.send(:include, mod.is_a?(String) ? mod.constantize : mod) - end - end - end - class Vendored < Plugin def self.all(list, paths) plugins = [] @@ -121,4 +103,4 @@ module Rails end end end -end
\ No newline at end of file +end |