fixed default widget for tags
This commit is contained in:
parent
915ea066d6
commit
e1c57c6843
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue