Cross Reference:
xref
: /
ontohub
/
app
/
models
/
ontology
/
entities.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
entities.rb revision cad2121a9e9a87317333b202956ce7478efcc257
module
Ontology
::
Entities
extend
ActiveSupport
::
Concern
included
do
has_many
:
entities
, :
extend
=>
Methods
end
module
Methods
def
update_or_create_from_hash
(
hash
)
e =
find_or_initialize_by_text
(
hash
[
'text'
])
e.name
=
hash
[
'name'
]
e.range
=
hash
[
'uri'
]
e.kind
=
hash
[
'kind'
]
e.text
=
hash
[
'text'
]
e.save
!
end
end
end