app/models/twitter_auth/generic_user.rb in mbleigh-twitter-auth-0.1.5 vs app/models/twitter_auth/generic_user.rb in mbleigh-twitter-auth-0.1.8
- old
+ new
@@ -21,12 +21,12 @@
:time_zone,
:utc_offset
]
validates_presence_of :login
- validates_format_of :login, :with => /\A[a-z0-9_]+\z/
+ validates_format_of :login, :with => /\A[a-z0-9_]+\z/i
validates_length_of :login, :in => 1..15
- validates_uniqueness_of :login
+ validates_uniqueness_of :login, :case_sensitive => false
def self.table_name; 'users' end
def self.new_from_twitter_hash(hash)
raise ArgumentError, 'Invalid hash: must include screen_name.' unless hash.key?('screen_name')