阅读背景:

如何检查ActiveRecord模型的实例是否是最新的?

来源:互联网 

For testing reasons, I want to check that one of my methods doesn't update a specific entry in my database. Is there a simple way to ask an instance of an ActiveRecord model if its in sync with the database? for instance, if we had a method foobar? that could do this:For testing reasons, I want to check that one o




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: