lib/catissue/database/controlled_values.rb
def find(public_id_or_alias, value, recursive=false)
      pid = ControlledValue.standard_public_id(public_id_or_alias)
      value_cv_hash = @pid_value_cv_hash[pid]
      cv = value_cv_hash[value]
      if recursive then
        fetch_descendants(cv, value_cv_hash)
      end
      cv
    end
def find(public_id_or_alias, value, recursive=false)
      pid = ControlledValue.standard_public_id(public_id_or_alias)
      value_cv_hash = @pid_value_cv_hash[pid]
      cv = value_cv_hash[value]
      if recursive then
        fetch_descendants(cv, value_cv_hash)
      end
      cv
    end
def find ( public_id_or_alias , value , recursive = false ) pid = ControlledValue . standard_public_id ( public_id_or_alias ) value_cv_hash = @pid_value_cv_hash [ pid ] cv = value_cv_hash [ value ] if recursive then fetch_descendants ( cv , value_cv_hash ) end cv end
Returns the CV with the given public_id_or_alias and value. Loads the CV if necessary
 from the database. The loaded CV does not have a parent or children.

 @param [String, Symbol] public_id_or_alias the caTissue public id or alias
 @param [String] value the CV value
 @param [Boolean] recursive whether to load the CV children as well.
 @return [CaRuby::ControlledValue, nil] the matching CV, or nil if no match
Returns the CV with the given public_id_or_alias and value . Loads the CV if necessary from the database . The loaded CV does not have a parent or children .