Commit 15016ae68dd2e59ce1b12b0be6e9870d16219569

Authored by Drew
1 parent 26bdeb21

resolved issue 244 and updated test

Showing 2 changed files with 2 additions and 2 deletions   Show diff stats
app/models/user.rb
... ... @@ -30,7 +30,7 @@ class User < ActiveRecord::Base
30 30 scope :not_in_project, lambda { |project| where("id not in (:ids)", :ids => project.users.map(&:id) ) }
31 31  
32 32 def identifier
33   - email.gsub "@", "_"
  33 + email.gsub /[@.]/, "_"
34 34 end
35 35  
36 36 def is_admin?
... ...
spec/models/user_spec.rb
... ... @@ -16,7 +16,7 @@ describe User do
16 16  
17 17 it "should return valid identifier" do
18 18 user = User.new(:email => "test@mail.com")
19   - user.identifier.should == "test_mail.com"
  19 + user.identifier.should == "test_mail_com"
20 20 end
21 21  
22 22 it "should have authentication token" do
... ...