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