Commit a49fd635 by liyijie

fix syntex error

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