app/models/taxon_concept.rb
# NOTE - If you call #images_from_solr with two different sets of options, you will get the same
# results on the second as with the first, so you only get one shot!
If you call #images_from_solr with two different sets of options, you will get the same
results on the second as with the first, so you only get one shot!
If you call #images_from_solr with two different sets of options you will get the same results on the second as with the first so you only get one shot!
def images_from_solr(limit = 4, options = {})
    @images_from_solr ||= data_objects_from_solr({
      per_page: limit,
      sort_by: 'status',
      data_type_ids: DataType.image_type_ids,
      vetted_types: ['trusted', 'unreviewed'],
      visibility_types: 'visible',
      ignore_translations: options[:ignore_translations] || false,
      return_hierarchically_aggregated_objects: true
    })
  end
def images_from_solr ( limit = 4 , options = { } ) @images_from_solr ||= data_objects_from_solr ( { per_page : limit , sort_by : 'status' , data_type_ids : DataType . image_type_ids , vetted_types : [ 'trusted' , 'unreviewed' ] , visibility_types : 'visible' , ignore_translations : options [ :ignore_translations ] || false , return_hierarchically_aggregated_objects : true } ) end
NOTE - If you call #images_from_solr with two different sets of options, you will get the same
results on the second as with the first, so you only get one shot!
NOTE - If you call #images_from_solr with two different sets of options you will get the same results on the second as with the first so you only get one shot!
limit
<not_specific>
options
<not_specific>