|
|
@ -18,6 +18,7 @@ module Admin
|
|
|
|
bootstrap_timeline_accounts
|
|
|
|
bootstrap_timeline_accounts
|
|
|
|
flavour
|
|
|
|
flavour
|
|
|
|
skin
|
|
|
|
skin
|
|
|
|
|
|
|
|
flavour_and_skin
|
|
|
|
thumbnail
|
|
|
|
thumbnail
|
|
|
|
hero
|
|
|
|
hero
|
|
|
|
mascot
|
|
|
|
mascot
|
|
|
@ -54,7 +55,13 @@ module Admin
|
|
|
|
def update
|
|
|
|
def update
|
|
|
|
authorize :settings, :update?
|
|
|
|
authorize :settings, :update?
|
|
|
|
|
|
|
|
|
|
|
|
settings_params.each do |key, value|
|
|
|
|
settings = settings_params
|
|
|
|
|
|
|
|
flavours_and_skin = settings.delete('flavour_and_skin')
|
|
|
|
|
|
|
|
if flavours_and_skin
|
|
|
|
|
|
|
|
settings['flavour'], settings['skin'] = flavours_and_skin.split('/', 2)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
settings.each do |key, value|
|
|
|
|
if UPLOAD_SETTINGS.include?(key)
|
|
|
|
if UPLOAD_SETTINGS.include?(key)
|
|
|
|
upload = SiteUpload.where(var: key).first_or_initialize(var: key)
|
|
|
|
upload = SiteUpload.where(var: key).first_or_initialize(var: key)
|
|
|
|
upload.update(file: value)
|
|
|
|
upload.update(file: value)
|
|
|
|