Commit ce9e6108 by liyijie

feat: 修改simple_controller的顺序

parent bff4b9ec
...@@ -230,11 +230,15 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -230,11 +230,15 @@ class SimpleController::BaseController < ::InheritedResources::Base
end end
end end
def end_of_association_chain
query_association_chain
end
def after_of_association_chain def after_of_association_chain
after_association_chain(query_association_chain) after_association_chain(end_of_association_chain)
end end
def end_of_association_chain def collection_of_association_chain
_association_chain = after_of_association_chain _association_chain = after_of_association_chain
if _association_chain.respond_to?(:order) if _association_chain.respond_to?(:order)
_association_chain.order(id: :desc) _association_chain.order(id: :desc)
...@@ -243,10 +247,6 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -243,10 +247,6 @@ class SimpleController::BaseController < ::InheritedResources::Base
end end
end end
def collection_of_association_chain
end_of_association_chain
end
# 执行统计和sub_q # 执行统计和sub_q
def ransack_association_chain def ransack_association_chain
association = collection_of_association_chain association = collection_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