【问题标题】:how to get rid of this plugin's class_inheritable_attribute deprecation warning?如何摆脱这个插件的 class_inheritable_attribute deprecation 警告?
【发布时间】:2011-10-19 22:09:13
【问题描述】:

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

 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...不知道如何自己修补这个。有什么提示吗?

【问题讨论】:

    标签: ruby-on-rails plugins deprecated


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-25
      • 1970-01-01
      • 2022-11-16
      • 2019-07-27
      • 1970-01-01
      • 1970-01-01
      • 2015-06-22
      相关资源
      最近更新 更多