From d17953ab8619a293d337542988ade7d3df2848d2 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 7 Nov 2013 17:19:18 +0800 Subject: [PATCH] partial is rendered when editing a page part --- app/controllers/admin/page_parts_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/page_parts_controller.rb b/app/controllers/admin/page_parts_controller.rb index d7b11404c..2b670b931 100644 --- a/app/controllers/admin/page_parts_controller.rb +++ b/app/controllers/admin/page_parts_controller.rb @@ -23,7 +23,9 @@ class Admin::PagePartsController < OrbitBackendController @class_options = LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]} @partial = 'default_widget' else - @frontend_styles = @module_app.widgets[params[:val]]["style"] rescue nil + + # @frontend_styles = @module_app.widgets[params[:val]]["style"] rescue nil + @frontend_styles = @module_app.widgets[@part.widget_path]["style"] rescue nil @partial = 'custom_widget' if @frontend_styles.present? end end