app/models/taxon_details.rb
# NOTE - artificial limit of text objects here to increase the default 30
artificial limit of text objects here to increase the default 30
artificial limit of text objects here to increase the default 30
def details_text
    text_objects = taxon_concept.text_for_user(user,
      language_ids: [ user.language.all_ids ],
      filter_by_subtype: true,
      allow_nil_languages: user.default_language?,
      toc_ids_to_ignore: TocItem.exclude_from_details.map(&:id),
      per_page: TEXT_OBJECT_LIMIT
    )
    selects = {
      hierarchy_entries: [ :id, :rank_id, :identifier, :hierarchy_id, :parent_id, :published, :visibility_id, :lft, :rgt, :taxon_concept_id, :source_url ],
      hierarchies: [ :id, :agent_id, :browsable, :outlink_uri, :label ],
      data_objects_hierarchy_entries: '*',
      curated_data_objects_hierarchy_entries: '*',
      data_object_translations: '*',
      table_of_contents: '*',
      info_items: '*',
      toc_items: '*',
      translated_table_of_contents: '*',
      users_data_objects: '*',
      resources: '*',
      content_partners: '*',
      refs: '*',
      ref_identifiers: '*',
      comments: 'id, parent_id',
      licenses: '*',
      users_data_objects_ratings: '*' }
    DataObject.preload_associations(text_objects, [ :users_data_objects_ratings, :comments, :license,
      { published_refs: { ref_identifiers: :ref_identifier_type } }, :translations, :data_object_translation, { toc_items: :info_items },
      { data_objects_hierarchy_entries: [ { hierarchy_entry: { hierarchy: { resource: :content_partner } } },
        :vetted, :visibility ] },
      { curated_data_objects_hierarchy_entries: :hierarchy_entry }, :users_data_object,
      { toc_items: [ :translations ] } ], select: selects)
    DataObject.sort_by_rating(text_objects, taxon_concept)
  end
def details_text text_objects = taxon_concept . text_for_user ( user , language_ids : [ user . language . all_ids ] , filter_by_subtype : true , allow_nil_languages : user . default_language? , toc_ids_to_ignore : TocItem . exclude_from_details . map ( & :id ) , per_page : TEXT_OBJECT_LIMIT ) selects = { hierarchy_entries : [ :id , :rank_id , :identifier , :hierarchy_id , :parent_id , :published , :visibility_id , :lft , :rgt , :taxon_concept_id , :source_url ] , hierarchies : [ :id , :agent_id , :browsable , :outlink_uri , :label ] , data_objects_hierarchy_entries : '*' , curated_data_objects_hierarchy_entries : '*' , data_object_translations : '*' , table_of_contents : '*' , info_items : '*' , toc_items : '*' , translated_table_of_contents : '*' , users_data_objects : '*' , resources : '*' , content_partners : '*' , refs : '*' , ref_identifiers : '*' , comments : 'id, parent_id' , licenses : '*' , users_data_objects_ratings : '*' } DataObject . preload_associations ( text_objects , [ :users_data_objects_ratings , :comments , :license , { published_refs : { ref_identifiers : :ref_identifier_type } } , :translations , :data_object_translation , { toc_items : :info_items } , { data_objects_hierarchy_entries : [ { hierarchy_entry : { hierarchy : { resource : :content_partner } } } , :vetted , :visibility ] } , { curated_data_objects_hierarchy_entries : :hierarchy_entry } , :users_data_object , { toc_items : [ :translations ] } ] , select : selects ) DataObject . sort_by_rating ( text_objects , taxon_concept ) end
NOTE - artificial limit of text objects here to increase the default 30
NOTE - artificial limit of text objects here to increase the default 30