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
Jérome Perrin
gitlab-ce
Commits
15016ae6
Commit
15016ae6
authored
Nov 18, 2011
by
Drew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolved issue 244 and updated test
parent
26bdeb21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/user.rb
app/models/user.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+1
-1
No files found.
app/models/user.rb
View file @
15016ae6
...
@@ -30,7 +30,7 @@ class User < ActiveRecord::Base
...
@@ -30,7 +30,7 @@ class User < ActiveRecord::Base
scope
:not_in_project
,
lambda
{
|
project
|
where
(
"id not in (:ids)"
,
:ids
=>
project
.
users
.
map
(
&
:id
)
)
}
scope
:not_in_project
,
lambda
{
|
project
|
where
(
"id not in (:ids)"
,
:ids
=>
project
.
users
.
map
(
&
:id
)
)
}
def
identifier
def
identifier
email
.
gsub
"@"
,
"_"
email
.
gsub
/[@.]/
,
"_"
end
end
def
is_admin?
def
is_admin?
...
...
spec/models/user_spec.rb
View file @
15016ae6
...
@@ -16,7 +16,7 @@ describe User do
...
@@ -16,7 +16,7 @@ describe User do
it
"should return valid identifier"
do
it
"should return valid identifier"
do
user
=
User
.
new
(
:email
=>
"test@mail.com"
)
user
=
User
.
new
(
:email
=>
"test@mail.com"
)
user
.
identifier
.
should
==
"test_mail
.
com"
user
.
identifier
.
should
==
"test_mail
_
com"
end
end
it
"should have authentication token"
do
it
"should have authentication token"
do
...
...
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