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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2e2e3521
Commit
2e2e3521
authored
13 years ago
by
Jeremy Mack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated validations and routes to support dots in project names
parent
8ee6d21f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/models/project.rb
app/models/project.rb
+2
-2
config/routes.rb
config/routes.rb
+3
-3
No files found.
app/models/project.rb
View file @
2e2e3521
...
...
@@ -25,7 +25,7 @@ class Project < ActiveRecord::Base
validates
:path
,
:uniqueness
=>
true
,
:presence
=>
true
,
:format
=>
{
:with
=>
/^[a-zA-Z0-9_\-]*$/
,
:format
=>
{
:with
=>
/^[a-zA-Z0-9_\-
\.
]*$/
,
:message
=>
"only letters, digits & '_' '-' allowed"
},
:length
=>
{
:within
=>
0
..
255
}
...
...
@@ -35,7 +35,7 @@ class Project < ActiveRecord::Base
validates
:code
,
:presence
=>
true
,
:uniqueness
=>
true
,
:format
=>
{
:with
=>
/^[a-zA-Z0-9_\-]*$/
,
:format
=>
{
:with
=>
/^[a-zA-Z0-9_\-
\.
]*$/
,
:message
=>
"only letters, digits & '_' '-' allowed"
},
:length
=>
{
:within
=>
3
..
255
}
...
...
This diff is collapsed.
Click to expand it.
config/routes.rb
View file @
2e2e3521
...
...
@@ -6,7 +6,7 @@ Gitlab::Application.routes.draw do
namespace
:admin
do
resources
:users
resources
:projects
resources
:projects
,
:constraints
=>
{
:id
=>
/[^\/]+/
}
resources
:team_members
get
'emails'
,
:to
=>
'mailer#preview'
get
'mailer/preview_note'
...
...
@@ -28,12 +28,12 @@ Gitlab::Application.routes.draw do
#get "profile/:id", :to => "profile#show"
resources
:projects
,
:only
=>
[
:new
,
:create
,
:index
]
resources
:projects
,
:
constraints
=>
{
:id
=>
/[^\/]+/
},
:
only
=>
[
:new
,
:create
,
:index
]
resources
:keys
devise_for
:users
resources
:projects
,
:except
=>
[
:new
,
:create
,
:index
],
:path
=>
"/"
do
resources
:projects
,
:
constraints
=>
{
:id
=>
/[^\/]+/
},
:
except
=>
[
:new
,
:create
,
:index
],
:path
=>
"/"
do
member
do
get
"team"
get
"wall"
...
...
This diff is collapsed.
Click to expand it.
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