Improve routing. Project access via namespace
This commit is contained in:
parent
a4d1bc1791
commit
26622f4c8f
4 changed files with 21 additions and 8 deletions
|
@ -135,7 +135,11 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def to_param
|
||||
code
|
||||
if namespace
|
||||
namespace.code + "/" + code
|
||||
else
|
||||
code
|
||||
end
|
||||
end
|
||||
|
||||
def web_url
|
||||
|
@ -201,4 +205,7 @@ class Project < ActiveRecord::Base
|
|||
path
|
||||
end
|
||||
end
|
||||
|
||||
def move_repo
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue