Commit d2f42265 by liyijie

fix: mongodb 恢复支持ransack的逻辑

parent b8ee6477
......@@ -337,7 +337,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
_params = query_params.clone.except(:scopes)
order_params = _params.delete(:s)
selector = RansackMongo::Query.parse(_params)
order_params.present? ?
association = order_params.present? ?
association.where(selector).order(*Array(order_params)) : association.where(selector)
end
association
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment