Created
July 10, 2009 06:29
-
-
Save benders/144278 to your computer and use it in GitHub Desktop.
Failing strawman for New Relic add_method_tracer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This doesn't work | |
| class Product < ActiveRecord::Base | |
| # Define a public Class method on Product | |
| def self.get_recommended_for_subscriber(subscriber) | |
| # ... call some web service, then use find to return a product instance ... | |
| end | |
| add_method_tracer :get_recommended_for_subscriber, 'Custom/Product.get_recommended_for_subscriber' | |
| # Instance methods of Product go here | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment