Commit a49fd635 by liyijie

fix syntex error

parent b351d946
......@@ -169,7 +169,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
if self.class.instance_variable_get(:@ransack_off) || params[:q].blank?
end_of_association_chain
else
end_of_association_chain.ransack(params[:q].result
end_of_association_chain.ransack(params[:q]).result
end
end
......@@ -180,7 +180,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
@statistic = statistic_association.group(params[:group_keys]).count.merge(count: statistic_association.count)
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.distinct unless self.class.instance_variable_get(:@distinct_off)
association = association.paginate(page: params[:page], per_page: params[:per_page]) unless self.class.instance_variable_get(:@paginate_off)
association
......
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