helpers/mappings_helper.rb
##
# Populate an array of mappings with class data retrieved from search
Populate an array of mappings with class data retrieved from search
Populate an array of mappings with class data retrieved from search
def populate_mapping_classes(mappings)
        return mappings if includes_param.empty?
        params["include_for_class"] = includes_param
        params.delete("display")
        params.delete("include")
        env["rack.request.query_hash"] = params
        orig_classes = mappings.map {|m| m.classes }.flatten.uniq
        orig_classes.delete_if { |key| !key.respond_to?(:submission) }
        acronyms = orig_classes.map {|c| c.submission.ontology.acronym}.uniq
        classes_hash = populate_classes_from_search(orig_classes, acronyms)
        replace_empty_classes(mappings, classes_hash)
        mappings
      end
def populate_mapping_classes ( mappings ) return mappings if includes_param . empty? params [ "include_for_class" ] = includes_param params . delete ( "display" ) params . delete ( "include" ) env [ "rack.request.query_hash" ] = params orig_classes = mappings . map { | m | m . classes } . flatten . uniq orig_classes . delete_if { | key | ! key . respond_to? ( :submission ) } acronyms = orig_classes . map { | c | c . submission . ontology . acronym } . uniq classes_hash = populate_classes_from_search ( orig_classes , acronyms ) replace_empty_classes ( mappings , classes_hash ) mappings end
Populate an array of mappings with class data retrieved from search
Populate an array of mappings with class data retrieved from search
# Move include param to special param so it only applies to classes # Delete classes that are External or Interportal
mappings
<not_specific>