Commit d9f916c4 by dongxiaowei

fix: change association

parent 8d38a5e2
...@@ -305,7 +305,7 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -305,7 +305,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
parent_objects = symbols_for_association_chain.each_with_object({}) do |sym, h| parent_objects = symbols_for_association_chain.each_with_object({}) do |sym, h|
h[sym.to_sym] = instance_variable_get("@#{sym}") h[sym.to_sym] = instance_variable_get("@#{sym}")
end end
scope_policy_class.new(current_user, database_policy_association_chain, **parent_objects).resolve scope_policy_class.new(current_user, origin_end_of_association_chain, **parent_objects).resolve
else else
origin_end_of_association_chain.respond_to?(:all) ? origin_end_of_association_chain.respond_to?(:all) ?
origin_end_of_association_chain.all : origin_end_of_association_chain origin_end_of_association_chain.all : origin_end_of_association_chain
......
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