This commit is contained in:
Anitha Palanisamy 2017-02-08 18:38:34 +00:00 committed by GitHub
commit 5c198a11aa
11 changed files with 215 additions and 18 deletions

View file

@ -54,7 +54,6 @@ class User < ActiveRecord::Base
scope :admin, -> { where(is_admin: true) }
validates :email, presence: true
validates :username,
uniqueness: {
case_sensitive: false
@ -62,6 +61,9 @@ class User < ActiveRecord::Base
presence: true
validate :biography_limit
validates :website_url, :linkedin, :googleplus, :gnu, :twitter, :gitlab, :github, :gna, :savannah, :diaspora,
format: { with: URI.regexp(%w(http https)), message: 'This is an invalid URL. It should start with http or https'},
allow_blank: true
##
# Checkes if the user attended the event