Enable guessing the anomaly notification that triggered the user feedback
This commit is contained in:
@ -9,4 +9,9 @@ class UserExerciseFeedback < ActiveRecord::Base
|
||||
def to_s
|
||||
"User Exercise Feedback"
|
||||
end
|
||||
|
||||
def anomaly_notification
|
||||
AnomalyNotification.where({exercise_id: exercise.id, user_id: user_id, user_type: user_type})
|
||||
.where("created_at < ?", created_at).order("created_at DESC").to_a.first
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user