how to get rid of this plugin's class_inheritable_attribute deprecation warning?

别说谁变了你拦得住时间么 提交于 2019-12-12 01:54:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!