FEATURE: Add auto update field to themes (#11102)

Themes marked for auto update will be automatically updated when
Discourse is updated. This is triggered by discourse_docker or
docker_manager running Rake task 'themes:update'.
This commit is contained in:
Dan Ungureanu
2020-11-16 14:44:09 +02:00
committed by GitHub
parent 0853208d67
commit bc8423a1bf
8 changed files with 48 additions and 7 deletions

View File

@ -178,7 +178,7 @@ class Admin::ThemesController < Admin::AdminController
disables_component = [false, "false"].include?(theme_params[:enabled])
enables_component = [true, "true"].include?(theme_params[:enabled])
[:name, :color_scheme_id, :user_selectable, :enabled].each do |field|
[:name, :color_scheme_id, :user_selectable, :enabled, :auto_update].each do |field|
if theme_params.key?(field)
@theme.public_send("#{field}=", theme_params[field])
end
@ -348,6 +348,7 @@ class Admin::ThemesController < Admin::AdminController
:user_selectable,
:component,
:enabled,
:auto_update,
settings: {},
translations: {},
theme_fields: [:name, :target, :value, :upload_id, :type_id],