Add and apply Rails/WhereNot rubocop rule
We simplify the code a little bit, and make it more consistent since we were already using `where.not` in most places.
This commit is contained in:
@@ -15,7 +15,7 @@ class Milestone < ApplicationRecord
|
||||
|
||||
scope :order_by_publication_date, -> { order(publication_date: :asc, created_at: :asc) }
|
||||
scope :published, -> { where("publication_date <= ?", Date.current.end_of_day) }
|
||||
scope :with_status, -> { where("status_id IS NOT NULL") }
|
||||
scope :with_status, -> { where.not(status_id: nil) }
|
||||
|
||||
def self.title_max_length
|
||||
80
|
||||
|
||||
Reference in New Issue
Block a user