Cross Reference: url_maps_controller.rb
xref
: /
ontohub
/
app
/
controllers
/
url_maps_controller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
422
N/A
class
UrlMapsController
<
InheritedResources
::
Base
1186
N/A
1186
N/A
belongs_to
:
repository
,
finder
: :
find_by_path
!
422
N/A
before_filter
:
check_write_permission
, :
except
=> [:
index
, :
show
]
422
N/A
before_filter
:
check_read_permissions
422
N/A
has_pagination
422
N/A
422
N/A
def
create
422
N/A
create
!
{
repository_url_maps_path
(
repository
)
}
422
N/A
end
422
N/A
422
N/A
def
update
422
N/A
update
!
{
repository_url_maps_path
(
repository
)
}
422
N/A
end
422
N/A
422
N/A
def
destroy
422
N/A
destroy
!
{
repository_url_maps_path
(
repository
)
}
422
N/A
end
422
N/A
422
N/A
protected
422
N/A
422
N/A
def
check_write_permission
1186
N/A
authorize
! :
write
,
parent
1186
N/A
end
1186
N/A
1186
N/A
def
check_read_permissions
1186
N/A
authorize
! :
show
,
Repository.find
_by_path
(
params
[:
repository_id
])
422
N/A
end
1063
N/A
1186
N/A
helper_method
:
repository
1186
N/A
def
repository
422
N/A
if
action_name
==
"index"
1186
N/A
Repository.find
_by_path
(
params
[:
repository_id
])
1186
N/A
else
1186
N/A
resource.repository
1186
N/A
end
422
N/A
end
1186
N/A
422
N/A
end
1186
N/A