|
|
|
@@ -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) |
|
|
|
|