问题
I'm getting this warning for a plugin I'm using:
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from has_private_messages at /vendor/plugins/simple-private-messages/lib/has_private_messages_extensions.rb:17)
I've created an issue at https://github.com/jongilbraith/simple-private-messages, but there isn't much recent activity on it.
I'm not familiar with class_inheritable_attribute... don't know how to patch this myself. Any hints?
回答1:
Fork the plugin on GitHub and find the calls to class_inheritable_attribute
and change them to class_attribute
. Remove the old plugin from your vendor/plugins
directory and add the new one. That would remove the deprecation warning.
来源:https://stackoverflow.com/questions/7828830/how-to-get-rid-of-this-plugins-class-inheritable-attribute-deprecation-warning