On Jul 25, 2006, at 6:23 PM, Michael Koziarski wrote:
Rails has been around for a while, and it's about time we got serious
about deprecating APIs which we no longer intend to support. Without
getting into a discussion about which code precisely is going to be
deprecated, I thought I'd describe what's going to happen.
If you run your tests, and your application calls a deprecated api
you'll see the following information printed to stdout.
@@@@@@@@@@ Deprecation Warning @@@@@@@@@@
Detailed Message Goes Here
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
One of these ugly printouts for every deprecated method call in your
application. When your application is in development or production
mode this same information will be output to your RAILS_ENV.log.
This unrepentant spamming is deliberate. Unlike some other
frameworks you may use, a deprecation warning in rails isn't a
threat, it's a promise. It will be removed in the next major rails
release.
So, what are people's thoughts about the warning methods, will it
get your attention?
That would probably be useful. I'd also like to see a rake task that
greps the app for deprecated calls. It might not be able to catch all
of them, but it should be able to find simple things like find_first
and @content_for_layout.
Is there some master list of deprecated items in the API? I'd be
willing to take a crack at a find_deprecated rake task.
--
Josh Susser
http://blog.hasmanythrough.com
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core