fixed default widget for tags
This commit is contained in:
1 parent
915ea066d6
commit
e1c57c6843
1 file changed
+2
-2
@@ -18,11 +18,11 @@ class DefaultWidgetController< OrbitWidgetController
|
||||
if !params["tag_id"].blank?
|
||||
if params["category_id"].blank? #has tag no cate
|
||||
result = eval(@ori_query)
|
||||
result.selector[:tagged_ids] = { "$in" => params['tag_id'].collect{|t| BSON::ObjectId(t)}}
|
||||
result.selector[:tagged_ids] = { "$in" => params['tag_id'] }
|
||||
else #has tag and cate
|
||||
result = eval(@ori_query)
|
||||
result.selector[get_category_field_name] = { "$in" => params['category_id'].collect{|t| BSON::ObjectId(t)}}
|
||||
result.selector[:tagged_ids] = { "$in" => params['tag_id'].collect{|t| BSON::ObjectId(t)}}
|
||||
result.selector[:tagged_ids] = { "$in" => params['tag_id'] }
|
||||
end
|
||||
elsif params["category_id"].blank? #no tag no cate
|
||||
result = eval(@ori_query)
|
||||
|
||||
Reference in new issue
Block a user