aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/railtie.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-06-28 00:12:15 +0200
committerXavier Noria <fxn@hashref.com>2010-06-28 00:12:15 +0200
commit4329f8133fee8e4f3e558787f67de59f0c4a4dd1 (patch)
tree346ef7340d8348e50d119ca749a16c1654c20a08 /railties/lib/rails/railtie.rb
parentc37f7d66e49ffe5ac2115cc30e5529fd1c2924a8 (diff)
parentebee77a28a7267d5f23a28ba23c1eb88a2d7d527 (diff)
downloadrails-4329f8133fee8e4f3e558787f67de59f0c4a4dd1.tar.gz
rails-4329f8133fee8e4f3e558787f67de59f0c4a4dd1.tar.bz2
rails-4329f8133fee8e4f3e558787f67de59f0c4a4dd1.zip
Merge remote branch 'rails/master'
Diffstat (limited to 'railties/lib/rails/railtie.rb')
-rw-r--r--railties/lib/rails/railtie.rb34
1 files changed, 2 insertions, 32 deletions
diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
index ad776933f2..dbdbfea509 100644
--- a/railties/lib/rails/railtie.rb
+++ b/railties/lib/rails/railtie.rb
@@ -114,36 +114,6 @@ module Rails
# end
# end
#
- # == Adding your subscriber
- #
- # Since version 3.0, Rails ships with a notification system which is used for several
- # purposes, including logging. If you are sending notifications in your Railtie, you may
- # want to add a subscriber to consume such notifications for logging purposes.
- #
- # The subscriber is added under the railtie_name namespace and only consumes notifications
- # under the given namespace. For example, let's suppose your railtie is publishing the
- # following "something_expensive" instrumentation:
- #
- # ActiveSupport::Notifications.instrument "my_railtie.something_expensive" do
- # # something expensive
- # end
- #
- # You can log this instrumentation with your own Rails::Subscriber:
- #
- # class MyRailtie::Subscriber < Rails::Subscriber
- # def something_expensive(event)
- # info("Something expensive took %.1fms" % event.duration)
- # end
- # end
- #
- # By registering it:
- #
- # class MyRailtie < Railtie
- # subscriber :my_gem, MyRailtie::Subscriber.new
- # end
- #
- # Take a look in Rails::Subscriber docs for more information.
- #
# == Application, Plugin and Engine
#
# A Rails::Engine is nothing more than a Railtie with some initializers already set.
@@ -176,8 +146,8 @@ module Rails
ActiveSupport::Deprecation.warn "railtie_name is deprecated and has no effect", caller
end
- def log_subscriber(name, log_subscriber)
- Rails::LogSubscriber.add(name, log_subscriber)
+ def log_subscriber(*)
+ ActiveSupport::Deprecation.warn "log_subscriber is deprecated and has no effect", caller
end
def rake_tasks(&blk)