mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Remove logical OR assignment of constants (#29201)
Constants should always be only assigned once. The logical OR assignment of a constant is a relic of the past before we used zeitwerk for autoloading and had bugs where a file could be loaded twice resulting in constant redefinition warnings.
This commit is contained in:
committed by
GitHub
parent
f3f37c9019
commit
322a3be2db
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DropPostColumns < ActiveRecord::Migration[5.2]
|
||||
DROPPED_COLUMNS ||= { posts: %i[via_email raw_email] }
|
||||
DROPPED_COLUMNS = { posts: %i[via_email raw_email] }
|
||||
|
||||
def up
|
||||
remove_column :posts, :via_email
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class DropEmailLogsTable < ActiveRecord::Migration[5.2]
|
||||
DROPPED_TABLES ||= %i[email_logs]
|
||||
DROPPED_TABLES = %i[email_logs]
|
||||
|
||||
def up
|
||||
drop_table :email_logs
|
||||
|
||||
Reference in New Issue
Block a user