Skip to content

Commit

Permalink
Autocorrect rubocop "where range" (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines authored Aug 13, 2024
1 parent 948e7ca commit b2d587f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/assignment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def deletion_date_cannot_be_in_the_past
"in_past"))
end

scope :active, -> { where("deadline >= ?", Time.zone.now) }
scope :active, -> { where(deadline: Time.zone.now..) }

scope :expired, -> { where("deadline < ?", Time.zone.now) }
scope :expired, -> { where(deadline: ...Time.zone.now) }

def self.accepted_file_types
[".pdf", ".tar.gz", ".cc", ".hh", ".m", ".mlx", ".zip"]
Expand Down
2 changes: 1 addition & 1 deletion app/models/medium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class Medium < ApplicationRecord
}
scope :proper, -> { where.not(sort: "RandomQuiz") }
scope :expired, lambda {
where(sort: "RandomQuiz").where("created_at < ?", 1.day.ago)
where(sort: "RandomQuiz").where(created_at: ...1.day.ago)
}

searchable do
Expand Down

0 comments on commit b2d587f

Please sign in to comment.