style: formalize preference for if/unless in rubocop (#2816)
This commit is contained in:
@@ -13,3 +13,8 @@ AllCops:
|
||||
- 'db/schema*.rb'
|
||||
- 'saas/db/migrate/**/*'
|
||||
- 'saas/db/saas_schema.rb'
|
||||
|
||||
Style/NegatedIf:
|
||||
Enabled: true
|
||||
Style/NegatedUnless:
|
||||
Enabled: true
|
||||
|
||||
@@ -39,7 +39,7 @@ module User::Avatar
|
||||
|
||||
private
|
||||
def avatar_content_type_allowed
|
||||
if !ALLOWED_AVATAR_CONTENT_TYPES.include?(avatar.content_type)
|
||||
unless ALLOWED_AVATAR_CONTENT_TYPES.include?(avatar.content_type)
|
||||
errors.add(:avatar, "must be a JPEG, PNG, GIF, or WebP image")
|
||||
end
|
||||
end
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ if Fizzy.saas?
|
||||
plugin :yabeda_prometheus
|
||||
end
|
||||
|
||||
if !Rails.env.local?
|
||||
unless Rails.env.local?
|
||||
# Because we expect fewer I/O waits than Rails apps that connect to the
|
||||
# database over the network, let's start with a baseline config of 1
|
||||
# worker per CPU, 1 thread per worker and tune it from there.
|
||||
|
||||
Reference in New Issue
Block a user