Cross Reference:
xref
: /
ontohub
/
app
/
models
/
entity.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
entity.rb revision 22e260fcd85642794d99c2ffaa333f2ef6ed7828
class
Entity
<
ActiveRecord
::
Base
include
Metadatable
include
Entity
::
Searching
belongs_to
:
ontology
has_and_belongs_to_many
:
sentences
scope
:
kind
, ->
(
kind
)
{
where
:
kind
=>
kind
}
def
self.grouped
_by_kind
select
(
'kind, count(*) AS count'
)
.
group
(:
kind
)
.
order
(
'count DESC, kind'
)
.
all
end
end