Commit 63eb36ec by liyijie

feat; _scope symbolize_keys first

parent 83e721bc
......@@ -353,7 +353,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
if query_params[:scopes].present?
association = Array.wrap(query_params[:scopes]).reduce(association) do |_association, _scope|
_scope.is_a?(Hash) ?
_scope.reduce(_association) { |_scope_association, (k, v)| method_invoke(_scope_association, k, v) } :
_scope.symbolize_keys.reduce(_association) { |_scope_association, (k, v)| method_invoke(_scope_association, k, v) } :
_association.send(_scope)
end
end
......
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