diff --git a/app/controllers/concerns/api/filtered.rb b/app/controllers/concerns/api/filtered.rb index 8d69984..c75be49 100644 --- a/app/controllers/concerns/api/filtered.rb +++ b/app/controllers/concerns/api/filtered.rb @@ -1,8 +1,8 @@ module Api::Filtered extend ActiveSupport::Concern - def filtered_collection(collection) - collection.ransack(query_string_filters).result + def filtered_collection(collection, bool = true) + collection.ransack(query_string_filters).result(distinct: bool) end private