我知道可以通过键入以下命令重新加载数据模型
> reload!
但我想知道是否有类似的方法来重新加载数据本身。
谢谢!
我不知道你还能从哪里把它装回去。。也许是固定装置?有时需要强制对象更新自身。
@model_instance = MyModel.first @model_instance.reload #=> forces the object to reflect the most recent info from the db