I’ve seen comments like this all too often in rails projects:
What’s wrong with this?
- The comment may no longer apply if the methods move around or someone accidentally inserts a method in between them.
- Deprecated methods blend in with the rest of the class’s methods.
Simply wrap these methods inside a module called DeprecatedMethods, then mix it in to the class.
Now the comment isn’t really necessary, and the deprecated methods live within their own module that’s namespaced to the class at hand.
Nothing groundbreaking, I know, but I find it to be an easy win to keep your deprecated methods organized until they’re eventually removed.