app/controllers/known_uris_controller.rb
# search for metadata URIs. If the term is empty then use all visible metadata URIs
# as a pick list. The :predicate_known_uri_id parameter here refers to the primary measurement.
# If that primary measurement has specified units, then remove UnitOfMeasure from the pick
# list as it should already be shown as a separate field
search for metadata URIs. If the term is empty then use all visible metadata URIs
as a pick list. The :predicate_known_uri_id parameter here refers to the primary measurement.
If that primary measurement has specified units, then remove UnitOfMeasure from the pick
list as it should already be shown as a separate field
search for metadata URIs . If the term is empty then use all visible metadata URIs as a pick list . The : predicate_known_uri_id parameter here refers to the primary measurement . If that primary measurement has specified units then remove UnitOfMeasure from the pick list as it should already be shown as a separate field
def autocomplete_known_uri_metadata
    lookup_predicate
    if params[:term].strip.blank?
      @known_uris = KnownUri.metadata.select{ |ku| ku.visible? }
    else
      @known_uris = search_known_uris_by_name_or_uri(params[:term])
      @known_uris.delete_if{ |ku| ku.uri_type_id != UriType.metadata.id }
    end
    if @predicate && @predicate.has_units?
      @known_uris.delete(KnownUri.unit_of_measure)
    end
    render_autocomplete_results
  end
def autocomplete_known_uri_metadata lookup_predicate if params [ :term ] . strip . blank? @known_uris = KnownUri . metadata . select { | ku | ku . visible? } else @known_uris = search_known_uris_by_name_or_uri ( params [ :term ] ) @known_uris . delete_if { | ku | ku . uri_type_id != UriType . metadata . id } end if @predicate && @predicate . has_units? @known_uris . delete ( KnownUri . unit_of_measure ) end render_autocomplete_results end
search for metadata URIs.
search for metadata URIs .