Add and apply Style/CollectionQuerying rubocop rule
This rule was added in rubocop 1.77. We were following it most of the time. It makes the code more readable in my humble opinion.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Default admin user (change password after first deploy to a server!)
|
||||
if Administrator.count == 0 && (!Rails.env.test? || !Tenant.default?)
|
||||
if Administrator.none? && (!Rails.env.test? || !Tenant.default?)
|
||||
admin = User.create!(username: "admin", email: "admin@consul.dev", password: "12345678",
|
||||
password_confirmation: "12345678", confirmed_at: Time.current,
|
||||
terms_of_service: "1")
|
||||
|
||||
Reference in New Issue
Block a user