Commit 1e191000 by liyijie

distinct record

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