操作记录后台查询菜单

This commit is contained in:
xxq250 2024-09-27 10:02:40 +08:00
parent 29ee61ab1b
commit cf36e89f56
1 changed files with 5 additions and 4 deletions

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)