8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'app/controllers/tasks/collection_objects/stepwise/determinations_controller.rb', line 8
def data
s = ::Queries::CollectionObject::Filter.new(taxon_determinations: :false)
.all
@collection_objects = ::CollectionObject.select('buffered_determinations, count(buffered_determinations) count_buffered').where('buffered_determinations is not null')
.where(id: s.all)
.group('buffered_determinations')
.having('count(buffered_determinations) > ?', params[:count_cutoff] || 10)
.order('count(buffered_determinations) DESC')
.page(params[:page])
.per(params[:per])
render json: @collection_objects
end
|