不建议使用“ ActiveRecord :: Core :: ClassMethods.find”调用 [英] 'ActiveRecord::Core::ClassMethods.find' call is deprecated

查看:78
本文介绍了不建议使用“ ActiveRecord :: Core :: ClassMethods.find”调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用RubyMine 2016.1,当我使用ActiveRecord的 find(id)方法时,它向我显示此弃用警告:'ActiveRecord :: Core :: ClassMethods。但是,在指南,不建议使用主键查找。

解决方案

Rubymine 2016.1中的已知错误。如果愿意,您可以跟踪此错误报告,并且您可以放心地忽略此弃用警告。 / p>

更新:该错误似乎已在Rubymine 2016.1.1安全版本中立即修复。 IDE不再将该语句注释为不推荐使用。


I'm using RubyMine 2016.1 and when I use the find(id) method of ActiveRecord it shows me this deprecation warning: 'ActiveRecord::Core::ClassMethods.find' call is deprecated, however, in the guide, find with primary key is not deprecated.

解决方案

This seems to be a known bug in Rubymine 2016.1. You can track this bug report if you like and you can safely ignore this deprecation warning.

Update: the bug seems to be fixed now in the Rubymine 2016.1.1 security release. The IDE no longer annotates this statement as deprecated.

这篇关于不建议使用“ ActiveRecord :: Core :: ClassMethods.find”调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆