Fix Rails/WhereRange
cop (#30343)
This commit is contained in:
parent
70608f824e
commit
def6b686ff
10 changed files with 15 additions and 15 deletions
|
@ -4,6 +4,6 @@ class BackupPolicy < ApplicationPolicy
|
|||
MIN_AGE = 6.days
|
||||
|
||||
def create?
|
||||
user_signed_in? && current_user.backups.where('created_at >= ?', MIN_AGE.ago).count.zero?
|
||||
user_signed_in? && current_user.backups.where(created_at: MIN_AGE.ago..).count.zero?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue