diff --git a/app/models/program_level.rb b/app/models/program_level.rb index 481ee2fe..0701593b 100644 --- a/app/models/program_level.rb +++ b/app/models/program_level.rb @@ -8,6 +8,6 @@ class ProgramLevel < ApplicationRecord validates :end_date, presence: false scope :active, -> { where(end_date: nil) } - scope :on_date, -> (date) { where("program_levels.start_date <= ? (AND program_levels.end_date > ? OR program_levels.end_date is null)", date, date)} + scope :on_date, -> (date) { where("program_levels.start_date <= ? AND (program_levels.end_date > ? OR program_levels.end_date is null)", date, date)} end