ontology.rb revision 77ccd99c84e9f4689ffa28fc7f0870ab5d4803bd
# Ontohub Library Includes
# Ontology Model Includes
scope :search, ->(query) { where "iri #{connection.ilike_operator} :term OR name #{connection.ilike_operator} :term", :term => "%" << query << "%" }
scope :done_sorted_by_entities_count, where(state: 'done').order('ontologies.entities_count desc')
def to_s
name? ? name : iri
end
# title for links
def title
name? ? iri : nil
end
def symbols
entities
end
def symbols_count
entities_count
end
end