fix active scope on review request

This commit is contained in:
2023-05-03 21:35:16 -03:00
parent 1cc11e2958
commit 8a249997cf

View File

@@ -23,6 +23,7 @@ class ReviewRequest < ApplicationRecord
belongs_to :question belongs_to :question
belongs_to :user belongs_to :user
scope :active, -> { where(answered: false) } # answered should be a boolean, it's a string by mistake
scope :active, -> { where(answered: nil) }
scope :inactive, -> { where(answered: true) } scope :inactive, -> { where(answered: true) }
end end