1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

12 commits

Author SHA1 Message Date
Rafael Mendonça França
8692db59af Copy-edit deprecation relared documentation [ci skip] 2012-09-13 14:02:18 -03:00
Piotr Niełacny
71993c6f97 Change ActiveSupport::Deprecation to class.
ActiveSupport::Deprecation is now a class rather than a module. You can
get instance of ActiveSupport::Deprecation calling #instance method.

  ActiveSupport::Deprecation.instance

But when you need to get new object od ActiveSupport::Deprecation you
need to just call #new.

  @instance = ActiveSupport::Deprecation.new

Since you can create a new object, you can change the version and the
name of the library where the deprecator concerned.

  ActiveSupport::Deprecation.new('2.0', 'MyGem')

If you need use another deprecator instance you can select it in the
options of deprecate method.

  deprecate :method, :deprecator => deprecator_instance

Documentation has been updated.
2012-09-13 08:42:00 +02:00
Robert Pankowecki
2c690a0f5b extend ActiveSupport::Deprecation with self, allow other objects to extend/include it also.
test local deprecation

deprecator object

Test ActiveSupport::Deprecation when included
2012-09-13 08:42:00 +02:00
Vijay Dev
6285675db1 fixes a few mistakes in api docs [ci skip] 2012-06-22 22:14:29 +05:30
Francesco Rodriguez
508538066c add example to AS::Deprecation#silence [ci skip] 2012-06-17 12:31:40 -05:00
Vijay Dev
f76dd271c6 minor changes 2011-04-27 19:50:51 +05:30
Aaron Patterson
f2beb56c8b fixing whitespace errors 2011-01-12 18:07:53 -08:00
Ryan Bigg
1cacb08b21 Improve documentation on ActiveSupport::Deprecation. 2010-12-21 10:40:15 +10:00
Jakub Suder
4f945e97e5 better callstack reporting in deprecation messages
now the reported line is the first line in the stack
that's outside Rails, which is the one that actually
caused the problem in the first place

[#5231 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-25 07:23:50 -03:00
José Valim
e596a8e14c Add the possibility to have several behaviors in AS::Deprecation. 2010-07-01 10:26:45 +02:00
Jeremy Kemper
8fc97d198e Allow deprecation messages with or without a final period. 2010-03-05 12:35:42 -08:00
Jeremy Kemper
727e9dc18a Dice up ActiveSupport::Deprecation 2009-04-17 21:29:30 -07:00