Cross Reference: repositories_controller.rb
xref
: /
ontohub
/
app
/
controllers
/
repositories_controller.rb
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
repositories_controller.rb revision c5c3d15651bb25d73c093a713382f5842040ebf2
class
RepositoriesController
<
InheritedResources
::
Base
respond_to
:
html
, :
text
defaults
finder
: :
find_by_path
!
load_and_authorize_resource
:
except
=> [:
index
]
def
create
resource.user
=
current_user
super
end
def
update
params
[:
repository
].
except
!
(:
source_address
, :
source_type
, :
name
)
super
end
def
index
@
repositories
=
Repository.accessible
_by
(
current_user
)
super
end
def
destroy
super
rescue
Ontology
::
DeleteError
=> e
flash
[:
error
] =
e.message
redirect_to
resource
end
protected
def
collection
super.order
(:
name
)
end
end