Rails/WhereNot

This commit is contained in:
Jared Beck 2021-08-29 23:27:54 -04:00
parent 43ee89fe0d
commit 63bd41e2c2
2 changed files with 1 additions and 7 deletions

View File

@ -54,12 +54,6 @@ Rails/RedundantForeignKey:
- 'spec/dummy_app/app/models/family/family_line.rb'
- 'spec/dummy_app/app/models/person.rb'
# Offense count: 1
# Cop supports --auto-correct.
Rails/WhereNot:
Exclude:
- 'lib/paper_trail/version_concern.rb'
# It may be possible for us to use safe_load, but we'd have to pass the
# safelists, like `whitelist_classes` into our serializer, and the serializer
# interface is a public API, so that would be a breaking change.

View File

@ -40,7 +40,7 @@ module PaperTrail
end
def not_creates
where "event <> ?", "create"
where.not(event: "create")
end
def between(start_time, end_time)