mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
操作记录记录用户信息
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user