Add an apply Rails/CompactBlank rubocop rule
In rubocop-rails 2.26.0, the Rails/CompactBlank rule was modified to handle cases where select(&:present?) is used. After identifying three occurrences in our code, we've decided to apply this rule as it encourages the use of the more efficient and clearer method, compact_blank. By using compact_blank, we improve code clarity and performance, as this method performs the same operation but in a more optimized way.
This commit is contained in:
@@ -367,6 +367,9 @@ Rails/ActiveRecordCallbacksOrder:
|
||||
Rails/AddColumnIndex:
|
||||
Enabled: true
|
||||
|
||||
Rails/CompactBlank:
|
||||
Enabled: true
|
||||
|
||||
Rails/CreateTableWithTimestamps:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
|
||||
Reference in New Issue
Block a user