Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
e07da598
Commit
e07da598
authored
Jan 26, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SEtup new routes for creating and changing repository files
parent
59b08942
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
config/routes.rb
config/routes.rb
+8
-5
No files found.
config/routes.rb
View file @
e07da598
...
...
@@ -211,17 +211,20 @@ Gitlab::Application.routes.draw do
end
scope
module: :projects
do
# Blob routes:
get
'/new/:id'
,
to:
'blob#new'
,
constraints:
{
id:
/.+/
},
as:
'new_blob'
post
'/create/:id'
,
to:
'blob#create'
,
constraints:
{
id:
/.+/
},
as:
'create_blob'
get
'/edit/:id'
,
to:
'blob#edit'
,
constraints:
{
id:
/.+/
},
as:
'edit_blob'
put
'/update/:id'
,
to:
'blob#update'
,
constraints:
{
id:
/.+/
},
as:
'update_blob'
post
'/preview/:id'
,
to:
'blob#preview'
,
constraints:
{
id:
/.+/
},
as:
'preview_blob'
resources
:blob
,
only:
[
:show
,
:destroy
],
constraints:
{
id:
/.+/
,
format:
false
}
do
get
:diff
,
on: :member
end
resources
:raw
,
only:
[
:show
],
constraints:
{
id:
/.+/
}
resources
:tree
,
only:
[
:show
],
constraints:
{
id:
/.+/
,
format:
/(html|js)/
}
resources
:edit_tree
,
only:
[
:show
,
:update
],
constraints:
{
id:
/.+/
},
path:
'edit'
do
# Cannot be GET to differentiate from GET paths that end in preview.
post
:preview
,
on: :member
end
resource
:avatar
,
only:
[
:show
,
:destroy
]
resources
:new_tree
,
only:
[
:show
,
:update
],
constraints:
{
id:
/.+/
},
path:
'new'
resources
:commit
,
only:
[
:show
],
constraints:
{
id:
/[[:alnum:]]{6,40}/
}
resources
:commits
,
only:
[
:show
],
constraints:
{
id:
/(?:[^.]|\.(?!atom$))+/
,
format:
/atom/
}
resources
:compare
,
only:
[
:index
,
:create
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment