Skip to content

Commit

Permalink
Rails/WhereNot
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredbeck committed Aug 30, 2021
1 parent 43ee89f commit 63bd41e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/paper_trail/version_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def destroys
end

def not_creates
where "event <> ?", "create"
where.not(event: "create")
end

def between(start_time, end_time)
Expand Down

0 comments on commit 63bd41e

Please sign in to comment.