app/models/comment.rb
# the description or name of the parent item (i.e. the name of the species or description of the object)
the description or name of the parent item
the description or name of the parent item
def parent_name
    return self.parent_type if self.parent.nil?
    return parent.entry.name.string if parent.respond_to?(:entry)
    return parent.description if parent.respond_to?(:description)
    return parent.name if parent.respond_to?(:name)
    return self.parent_type
  end
def parent_name return self . parent_type if self . parent . nil? return parent . entry . name . string if parent . respond_to? ( :entry ) return parent . description if parent . respond_to? ( :description ) return parent . name if parent . respond_to? ( :name ) return self . parent_type end
the description or name of the parent item (i.e.
the description or name of the parent item ( i . e .