Commit 0e800b9c by liyijie

fix: 解决语法错误

parent ad7a6282
......@@ -317,7 +317,6 @@ class SimpleController::BaseController < ::InheritedResources::Base
def ransack_association(association, query_params)
# scopes,代表前端直接调用后台的scope过滤
association = Array(query_params[:scopes]).reduce(association) { |_association, _scope| _association.send(_scope) } if query_params[:scopes].present?
end
if active_record?
association.ransack(query_params.except(:scopes, :refs, :jorder)).result
# PG,为了支持distinct和order的操作,需要增加refs,手动includes 和 joins
......
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