Commit f52ef1e1 by liyijie

feat: singleton resource end_of_association_chain support

parent a6a53402
......@@ -225,7 +225,8 @@ class SimpleController::BaseController < ::InheritedResources::Base
origin_end_of_association_chain.is_a?(ActiveRecord::Relation)
scope_policy_class.new(current_user, origin_end_of_association_chain).resolve
else
origin_end_of_association_chain.all
origin_end_of_association_chain.respond_to?(:all) ?
origin_end_of_association_chain.all : origin_end_of_association_chain
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