Cross Reference: oops_response.rb
xref
: /
ontohub
/
app
/
models
/
oops_response.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
oops_response.rb revision d6f4200103ff4fdbb3d9bfb1296a27a366808b0d
class
OopsResponse
<
ActiveRecord
::
Base
belongs_to
:
request
,
class_name
:
'OopsRequest'
has_and_belongs_to_many
:
entities
attr_accessor
:
affects
attr_accessible
:
code
, :
description
, :
name
, :
element_type
, :
affects
# create affects if present
after_create
:
create_affects
,
if
: :
affects
def
create_affects
request
=
OopsRequest.find
(
oops_request_id
)
# otherwise request is nil :-(
self.entities
=
request.ontology_version.ontology.entities.where
(
iri
:
affects
)
.
all
end
end