Cross Reference: actions_controller.rb
xref
: /
ontohub
/
app
/
controllers
/
api
/
v1
/
actions_controller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
actions_controller.rb revision b1c6dc3eae29d626755528831e111338b07116b8
class
Api
::
V1
::
ActionsController
<
Api
::
V1
::
Base
inherit_resources
actions
:
show
def
show
if
resource.ready
?
response.status
=
303
response.headers
[
'Location'
] =
inner_resource_location
render
json
: {
status
:
response.message
,
location
:
response.location
}
else
super
end
end
protected
def
inner_resource_location
if
resource.resource.respond
_to
?
(:
locid
)
resource.resource.locid
else
url_for
(
resource.resource
)
end
end
end