Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我确定我记得有一种方法可以获取脏资源的属性列表,但我似乎无法在任何地方找到该方法。
那么有什么方法可以返回一个脏属性数组吗?
dirty_attributes
这应该可以解决问题:
http://rubydoc.info/github/datamapper/dm-core/master/DataMapper/Resource#dirty_attributes-instance_method