mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 01:44:11 +08:00
The configuration used to be saved as a pipe-separated value in site settings, with only the enabled ones. This meant there would be no order kept if something is disabled as they were simply omitted from the site setting. This commit moves us to a DB table to save the settings so order can be kept. Also, the change is committed immediately now instead of on closure of the modal. It is also smart about not refreshing when toggling "off" or rearranging.
10 lines
266 B
Ruby
Vendored
10 lines
266 B
Ruby
Vendored
# frozen_string_literal: true
|
|
class RemoveAdminDashboardSectionsSetting < ActiveRecord::Migration[8.0]
|
|
def up
|
|
execute "DELETE FROM site_settings WHERE name = 'admin_dashboard_sections'"
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|