Fix query in default widget for tags
This commit is contained in:
parent
f5728a4f92
commit
324ab266af
|
@ -18,7 +18,7 @@ class DefaultWidgetController< OrbitWidgetController
|
||||||
if params["category_id"].blank?
|
if params["category_id"].blank?
|
||||||
result = @tag.send(ori_class_name.downcase.pluralize)
|
result = @tag.send(ori_class_name.downcase.pluralize)
|
||||||
else
|
else
|
||||||
result = @tag.send(ori_class_name.downcase.pluralize).where(:category_id=>params["category_id"])
|
result = @tag.send(ori_class_name.downcase.pluralize).where(get_category_field_name(ori_class_name) => params['category_id'])
|
||||||
end
|
end
|
||||||
elsif params["category_id"].blank?
|
elsif params["category_id"].blank?
|
||||||
result = eval(@default_widget["query"])
|
result = eval(@default_widget["query"])
|
||||||
|
|
Loading…
Reference in New Issue