开发者

Rails -> do something with "updated_at" like "set_primary_key" for the id

开发者 https://www.devze.com 2023-01-12 02:10 出处:网络
have a legacy table with a field \"LastModifiedDate\", and I want to use that column as my \"updated_at\" column.

have a legacy table with a field "LastModifiedDate", and I want to use that column as my "updated_at" column.

Is there any way to tell Rails to use that field?

Or, let me rephrase. :) ... How can I tell Rails to开发者_如何转开发 use that field? :)

Thanks!


Hi You may use after_update to change value of that column

0

精彩评论

暂无评论...
验证码 换一张
取 消