From 05104c93a1b12845875691e7b97ea9d9239c8ef1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 9 Jul 2014 23:21:35 -0400 Subject: disallow spaces in usernames --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/models/user.rb b/app/models/user.rb index 462136f..46cd532 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -52,7 +52,7 @@ class User < ActiveRecord::Base validates(:user_name, presence: true, length:{maximum: 50}, - format: {with: /\A[a-zA-Z0-9 _\-]+\z/}, + format: {with: /\A[a-zA-Z0-9_-]+\z/}, uniqueness: {case_sensitive: false }) # password_digest:string -- cgit v1.2.3-2-g168b