操作记录记录用户信息
This commit is contained in:
parent
3fae388d92
commit
19cf675f2e
|
@ -66,9 +66,12 @@ class UserAction < ApplicationRecord
|
|||
def build_mode(model_name)
|
||||
model = model_name.constantize.new
|
||||
model_name.constantize.column_names.each do |col|
|
||||
model[col] = self.data_bank[col]
|
||||
data = self.data_bank.class == String ? JSON.parse(self.data_bank) : self.data_bank
|
||||
model[col] = data[col]
|
||||
end
|
||||
model
|
||||
rescue =>err
|
||||
return nil
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue