Always use user object instead of ID and Type
This commit is contained in:
@ -17,7 +17,7 @@ class UserExerciseFeedback < ApplicationRecord
|
||||
end
|
||||
|
||||
def anomaly_notification
|
||||
AnomalyNotification.where({exercise_id: exercise.id, user_id:, user_type:})
|
||||
AnomalyNotification.where({exercise_id: exercise.id, user:})
|
||||
.where('created_at < ?', created_at).order('created_at DESC').to_a.first
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user