Rails/WhereNot
This commit is contained in:
parent
43ee89fe0d
commit
63bd41e2c2
|
@ -54,12 +54,6 @@ Rails/RedundantForeignKey:
|
||||||
- 'spec/dummy_app/app/models/family/family_line.rb'
|
- 'spec/dummy_app/app/models/family/family_line.rb'
|
||||||
- 'spec/dummy_app/app/models/person.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
|
# 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
|
# safelists, like `whitelist_classes` into our serializer, and the serializer
|
||||||
# interface is a public API, so that would be a breaking change.
|
# interface is a public API, so that would be a breaking change.
|
||||||
|
|
|
@ -40,7 +40,7 @@ module PaperTrail
|
||||||
end
|
end
|
||||||
|
|
||||||
def not_creates
|
def not_creates
|
||||||
where "event <> ?", "create"
|
where.not(event: "create")
|
||||||
end
|
end
|
||||||
|
|
||||||
def between(start_time, end_time)
|
def between(start_time, end_time)
|
||||||
|
|
Loading…
Reference in New Issue