评阅记录的删除

dev_cxt
cxt 5 years ago
parent a2f3f815ca
commit 0190848197

@ -105,7 +105,7 @@ class StudentWork < ApplicationRecord
end
def delete_atta atta
last_score = student_works_scores.where.not(score: nil).last
last_score = student_works_scores.last
(atta.author_id == User.current.id) && (last_score.blank? || last_score.try(:created_at) < atta.created_on)
end

Loading…
Cancel
Save