app/controllers/known_uris_controller.rb
# search for unit URIs. If the term is empty and given a predicate, use the
# visible specified units as a pick list. If given a term, search for any
# KnownUri which is a unit of measure value URI
search for unit URIs. If the term is empty and given a predicate, use the
visible specified units as a pick list. If given a term, search for any
KnownUri which is a unit of measure value URI
search for unit URIs . If the term is empty and given a predicate use the visible specified units as a pick list . If given a term search for any KnownUri which is a unit of measure value URI
def autocomplete_known_uri_units
    lookup_predicate
    if params[:term].blank? || params[:term].strip.blank?
      @known_uris = @predicate ? @predicate.units_for_form_select : []
      if @known_uris.blank?
        @known_uris = KnownUri.default_units_for_form_select
      end
    else
      @known_uris = search_known_uris_by_name_or_uri(params[:term])
      allowed_values = KnownUri.unit_of_measure.allowed_values
      @known_uris.delete_if{ |ku| ! allowed_values.include?(ku) }
    end
    render_autocomplete_results
  end
def autocomplete_known_uri_units lookup_predicate if params [ :term ] . blank? || params [ :term ] . strip . blank? @known_uris = @predicate ? @predicate . units_for_form_select : [ ] if @known_uris . blank? @known_uris = KnownUri . default_units_for_form_select end else @known_uris = search_known_uris_by_name_or_uri ( params [ :term ] ) allowed_values = KnownUri . unit_of_measure . allowed_values @known_uris . delete_if { | ku | ! allowed_values . include? ( ku ) } end render_autocomplete_results end
search for unit URIs.
search for unit URIs .