From 01c82140669922b1e2b13b3fb89c2d15fc04cb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B4nio=20Roberto=20Silva?= Date: Mon, 22 Mar 2010 15:34:12 -0300 Subject: [PATCH] =?UTF-8?q?Modifica=C3=A7=C3=A3o=20na=20RE=20para=20aceita?= =?UTF-8?q?r=20numeros=20no=20login=20do=20github?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 6b8bf0d..4ec3546 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -30,7 +30,7 @@ class User < ActiveRecord::Base with_options :allow_blank => true do |u| u.validates_length_of :name, :city, :github, :in => 1..255 u.validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i - u.validates_format_of :github, :with => /^[a-z_]+$/ + u.validates_format_of :github, :with => /^[a-z_0-9]+$/ u.validates_uniqueness_of :email, :github, :case_sensitive => false end