Commit 15016ae6 authored by Drew's avatar Drew

resolved issue 244 and updated test

parent 26bdeb21
...@@ -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?
......
...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment