Add and apply Rails/WhereMissing rubocop rule
So now we know where to use the `where.missing` method which was introduced in Rails 6.1. Note this rule didn't detect all cases where the new method can be used.
This commit is contained in:
@@ -44,7 +44,7 @@ module SDG::Relatable
|
||||
end
|
||||
|
||||
def pending_sdg_review
|
||||
left_joins(:sdg_review).merge(SDG::Review.where(id: nil))
|
||||
where.missing(:sdg_review)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user