From 001abfc4cbe87f55482e093c4c3348653c392df8 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 14 Dec 2017 11:40:14 +0100 Subject: [PATCH] Revert "FIX: not permitted theme params when importing theme" This reverts commit 813df1a3fb1a10703517e08a9e8221c336063b5d. --- app/controllers/admin/themes_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/admin/themes_controller.rb b/app/controllers/admin/themes_controller.rb index e83cebea5e1..5416f10d500 100644 --- a/app/controllers/admin/themes_controller.rb +++ b/app/controllers/admin/themes_controller.rb @@ -26,13 +26,13 @@ class Admin::ThemesController < Admin::AdminController def import @theme = nil - uploaded_theme = params.require(:theme) - if uploaded_theme - json = JSON::parse(uploaded_theme.read) + if params[:theme] + json = JSON::parse(params[:theme].read) theme = json['theme'] @theme = Theme.new(name: theme["name"], user_id: current_user.id) theme["theme_fields"]&.each do |field| + if field["raw_upload"] begin tmp = Tempfile.new