Commit 70b1be3a by liyijie

Do not use distinct, or sum will be error

parent 00a43072
...@@ -52,7 +52,7 @@ class SimpleController::BaseController < ::InheritedResources::Base ...@@ -52,7 +52,7 @@ class SimpleController::BaseController < ::InheritedResources::Base
def ransack_paginate(association) def ransack_paginate(association)
association.ransack( association.ransack(
params[:q] params[:q]
).result.distinct.paginate( ).result.paginate(
page: params[:page], per_page: params[:per_page] page: params[:page], per_page: params[:per_page]
) )
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