app/helpers/admin/taggable_content_helper.rb
def taggable_document_collection_groups_container
    Rails.cache.fetch(taggable_document_collection_groups_cache_digest, expires_in: 1.day) do
      DocumentCollection.latest_edition.alphabetical.includes(:groups).flat_map do |collection|
        collection.groups.map { |group| ["#{collection.title} (#{group.heading})", group.id] }
      end
    end
  end
# Returns an Array representing the taggable document collections and their
# groups. Each element of the array consists of two values: the
# collection/group name and the ID of the group.
Returns an Array representing the taggable document collections and their
groups. Each element of the array consists of two values: the
collection/group name and the ID of the group.
Returns an Array representing the taggable document collections and their groups . Each element of the array consists of two values : the collection / group name and the ID of the group .
def taggable_document_collection_groups_container
    Rails.cache.fetch(taggable_document_collection_groups_cache_digest, expires_in: 1.day) do
      DocumentCollection.latest_edition.alphabetical.includes(:groups).flat_map do |collection|
        collection.groups.map { |group| ["#{collection.title} (#{group.heading})", group.id] }
      end
    end
  end
def taggable_document_collection_groups_container Rails . cache . fetch ( taggable_document_collection_groups_cache_digest , expires_in : 1 . day ) do DocumentCollection . latest_edition . alphabetical . includes ( :groups ) . flat_map do | collection | collection . groups . map { | group | [ "#{collection.title} (#{group.heading})" , group . id ] } end end end
Returns an Array representing the taggable document collections and their
groups.
Returns an Array representing the taggable document collections and their groups .