Fix default widget get_filter_data

This commit is contained in:
spen 2014-03-31 11:14:44 +08:00
parent 05ad8c27dd
commit dea2652581
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ class DefaultWidgetController< OrbitWidgetController
end end
def get_filter_data 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 if params[:filter_category_id].is_a? Array
data = model.where(:category_id.in => params[:filter_category_id]) data = model.where(:category_id.in => params[:filter_category_id])
elsif params[:filter_category_id].is_a? String elsif params[:filter_category_id].is_a? String