Commit 75ca91b7 by liyijie

feat: ransack always

parent 1bdcad90
...@@ -269,6 +269,7 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -269,6 +269,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
end end
association = association.ransack(params[:sub_q]).result unless self.class.instance_variable_get(:@ransack_off) || params[:sub_q].blank? association = association.ransack(params[:sub_q]).result unless self.class.instance_variable_get(:@ransack_off) || params[:sub_q].blank?
association = association.ransack(params[:q]).result unless self.class.instance_variable_get(:@ransack_off) || params[:q].blank?
association = association.distinct unless self.class.instance_variable_get(:@distinct_off) || !association.respond_to?(:distinct) association = association.distinct unless self.class.instance_variable_get(:@distinct_off) || !association.respond_to?(:distinct)
association association
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