Skip to content
Snippets Groups Projects
Commit 15016ae6 authored by Drew's avatar Drew
Browse files

resolved issue 244 and updated test

parent 26bdeb21
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -30,7 +30,7 @@ class User < ActiveRecord::Base
scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) }
 
def identifier
email.gsub "@", "_"
email.gsub /[@.]/, "_"
end
 
def is_admin?
Loading
Loading
Loading
Loading
@@ -16,7 +16,7 @@ describe User do
 
it "should return valid identifier" do
user = User.new(:email => "test@mail.com")
user.identifier.should == "test_mail.com"
user.identifier.should == "test_mail_com"
end
 
it "should have authentication token" do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment