Browse Source

操作记录后台查询菜单

pull/347/head
xxq250 1 year ago
parent
commit
cf36e89f56
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      app/models/user_action.rb

+ 5
- 4
app/models/user_action.rb View File

@@ -48,10 +48,11 @@ class UserAction < ApplicationRecord
end

def user
action_user = User.find_by(id: self.user_id)
if action_user.blank?
action_user = self.action_data
end
action_user = if action_type == "DestroyUser" && data_bank.present?
build_mode("User")
else
User.find_by(id: self.user_id)
end
action_user
end
def build_mode(model_name)


Loading…
Cancel
Save