mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:45:26 +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
@ -3,7 +3,7 @@
|
||||
class RemoveEmojiOneFromEmojiSetSiteSetting < ActiveRecord::Migration[6.0]
|
||||
def up
|
||||
result = execute("SELECT value FROM site_settings WHERE name='emoji_set' and value='emoji_one'")
|
||||
return unless result.count > 0
|
||||
return if result.count.zero?
|
||||
|
||||
execute "DELETE FROM site_settings where name='emoji_set' and value='emoji_one'"
|
||||
execute "UPDATE posts SET baked_version = 0 WHERE cooked LIKE '%/images/emoji/emoji_one%'"
|
||||
|
Reference in New Issue
Block a user