mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Update to lastest rubocop-discourse
This commit is contained in:
committed by
Loïc Guitaut
parent
3b6d4c830f
commit
2a28cda15c
@@ -42,7 +42,7 @@ module Chat
|
||||
def dismiss_retention_reminder
|
||||
params.require(:chatable_type)
|
||||
guardian.ensure_can_chat!
|
||||
unless Chat::Channel.chatable_types.include?(params[:chatable_type])
|
||||
if Chat::Channel.chatable_types.exclude?(params[:chatable_type])
|
||||
raise Discourse::InvalidParameters
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ module Jobs
|
||||
def execute(args)
|
||||
reason = args[:reason]
|
||||
valid_reasons = %w[new edit]
|
||||
return unless valid_reasons.include?(reason)
|
||||
return if valid_reasons.exclude?(reason)
|
||||
|
||||
return if (timestamp = args[:timestamp]).blank?
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ class AddThreadsEnabledSiteSetting < ActiveRecord::Migration[7.0]
|
||||
threading_enabled_channels =
|
||||
DB.query_single("SELECT name FROM chat_channels WHERE threading_enabled = 't'")
|
||||
|
||||
return unless threading_enabled_channels.present?
|
||||
return if threading_enabled_channels.blank?
|
||||
|
||||
DB.exec("UPDATE site_settings SET value = 't' WHERE name = 'chat_threads_enabled'")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user