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.
有一个带有字段“LastModifiedDate”的旧表,我想将该列用作我的“updated_at”列。
有没有办法告诉 Rails 使用该字段?
或者,让我换个说法。:) ...我如何告诉 Rails 使用该字段?:)
谢谢!
嗨,您可以after_update用来更改该列的值
after_update