如何摆脱这个插件的 class_inheritable_attribute 弃用警告?

发布于 2024-12-10 14:41:40 字数 599 浏览 0 评论 0原文

我收到有关我正在使用的插件的警告:

 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)

我在 https: //github.com/jongilbraith/simple-private-messages,但最近没有太多活动。

我不熟悉 class_inheritable_attribute...不知道如何自己修补它。有什么提示吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

女中豪杰 2024-12-17 14:41:40

在 GitHub 上分叉该插件并找到对 class_inheritable_attribute 的调用并将其更改为 class_attribute。从 vendor/plugins 目录中删除旧插件并添加新插件。这将删除弃用警告。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文