From dea26525812f548d433d9d79e7116f9889667b4c Mon Sep 17 00:00:00 2001 From: spen Date: Mon, 31 Mar 2014 11:14:44 +0800 Subject: [PATCH] Fix default widget get_filter_data --- app/controllers/default_widget_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/default_widget_controller.rb b/app/controllers/default_widget_controller.rb index 332e19b..8b0701c 100644 --- a/app/controllers/default_widget_controller.rb +++ b/app/controllers/default_widget_controller.rb @@ -104,7 +104,7 @@ class DefaultWidgetController< OrbitWidgetController end def get_filter_data - model = @default_widget["query"].classify.constantize + model = @default_widget["query"].split('.')[0].classify.constantize if params[:filter_category_id].is_a? Array data = model.where(:category_id.in => params[:filter_category_id]) elsif params[:filter_category_id].is_a? String