diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/plugin.rb | 1 | ||||
-rw-r--r-- | railties/lib/rails/railtie.rb | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/railties/lib/rails.rb b/railties/lib/rails.rb index 5f7e595d64..4ded2515fc 100644 --- a/railties/lib/rails.rb +++ b/railties/lib/rails.rb @@ -15,6 +15,7 @@ require 'rails/rack' require 'rails/paths' require 'rails/configuration' require 'rails/deprecation' +require 'rails/subscriber' require 'rails/ruby_version_check' # For Ruby 1.8, this initialization sets $KCODE to 'u' to enable the diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb index 9cc6b9c35b..a057b8f701 100644 --- a/railties/lib/rails/plugin.rb +++ b/railties/lib/rails/plugin.rb @@ -53,6 +53,7 @@ module Rails ActionController::Base.view_paths.concat ["#{path}/app/views"] if File.directory?("#{path}/app/views") end + # TODO Isn't it supposed to be :after => "action_controller.initialize_routing" ? initializer :add_routing_file, :after => :initialize_routing do |app| routing_file = "#{path}/config/routes.rb" if File.exist?(routing_file) diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb index ff28ade35d..43a0303c5b 100644 --- a/railties/lib/rails/railtie.rb +++ b/railties/lib/rails/railtie.rb @@ -25,6 +25,10 @@ module Rails Configuration.default end + def self.subscriber(subscriber) + Rails::Subscriber.add(plugin_name, subscriber) + end + def self.rake_tasks(&blk) @rake_tasks ||= [] @rake_tasks << blk if blk |