mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: Enable unless
cops
We discussed the use of `unless` internally and decided to enforce available rules from rubocop to restrict its most problematic uses.
This commit is contained in:

committed by
Loïc Guitaut

parent
87de3c2319
commit
f7c57fbc19
@ -48,7 +48,7 @@ class EditDirectoryColumnsController < ApplicationController
|
||||
.where(directory_column: { user_field_id: nil })
|
||||
.where("show_on_profile=? OR show_on_user_card=?", true, true)
|
||||
|
||||
return unless user_fields_without_column.count > 0
|
||||
return if user_fields_without_column.count <= 0
|
||||
|
||||
next_position = DirectoryColumn.maximum("position") + 1
|
||||
|
||||
|
Reference in New Issue
Block a user