我已经取代了我已经替换created_at& update_at by CREATEDATE,:MODIFYDATE Active_admin
但它没有自动更新
以下是代码
class DeviceMaster < ActiveRecord::Base
set_table_name "MDDMT"
set_primary_key "DMTRFNUM"
attr_accessible :DMTDEVICEID, :DMTISACTIVE, :CREATEDBY, :MODIFIEDBY, :CREATEDATE, :MODIFYDATE,
:EXTRAFIELD1, :EXTRAFIELD2, :EXTRAFIELD3, :EXTRAFIELD4
alias_attribute :created_at, :MODIFYDATE
alias_attribute :updated_at, :MODIFYDATE
end
那么如何实现CREATEDATE的created_at updated_at列功能:MODIFYDATE
别名列是正确的方法还是我需要在模型中单独写回写?
的问候,