# Use ActiveSupport::Deprecation myself?

**URL:** <https://www.ruby-forum.com/t/use-activesupport-deprecation-myself/186371>\
**Category:** Rails\
**Created:** [April 5, 2010, 11:48pm UTC](https://www.ruby-forum.com/t/use-activesupport-deprecation-myself/186371 "2010-04-05T23:48:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [April 5, 2010, 11:48pm UTC](https://www.ruby-forum.com/t/use-activesupport-deprecation-myself/186371/1 "2010-04-05T23:48:22Z")

</div>

So I have a plugin that is shared by many people. I’d really like a  
good way to mark certain methods as ‘deprecated’, that will be  
disappearing in a future version.

I noticed that ActiveSupport::Deprecation seems to already include such  
things, and is used internally for marking Rails code as deprecated.

But would it make sense to use this myself? It seems to be lacking any  
public rdoc at all, which makes me a bit nervous, maybe I shoudln’t use  
it? But seems like it would work.

class MyOwn  
include ActiveSupport::Deprecation

deprecate(:method\_name)

…  
end

Good idea? Horrible idea? Is there a better idea to be able to mark  
deprecated stuff in my own classes?

---

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [April 6, 2010, 1:21am UTC](https://www.ruby-forum.com/t/use-activesupport-deprecation-myself/186371/2 "2010-04-06T01:21:23Z")

</div>

On Mon, Apr 5, 2010 at 2:48 PM, Jonathan R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> deprecated stuff in my own classes?  
> Great idea!

You don’t need to mix in the module, either: the deprecate method is  
already available in your classes.

jeremy
