app/models/sample.rb
def title_attribute_value
    return nil unless sample_type && sample_type.sample_attributes.title_attributes.any?
    title_attr = sample_type.sample_attributes.title_attributes.first
    get_attribute(title_attr.hash_key)
  end
# the value of the designated title attribute
the value of the designated title attribute
the value of the designated title attribute
def title_attribute_value
    return nil unless sample_type && sample_type.sample_attributes.title_attributes.any?
    title_attr = sample_type.sample_attributes.title_attributes.first
    get_attribute(title_attr.hash_key)
  end
def title_attribute_value return nil unless sample_type && sample_type . sample_attributes . title_attributes . any? title_attr = sample_type . sample_attributes . title_attributes . first get_attribute ( title_attr . hash_key ) end
the value of the designated title attribute
the value of the designated title attribute