added user edit, show view info and spec for user profile update

This commit is contained in:
AnithaPal 2016-08-30 13:19:29 -04:00
parent c48c8afa51
commit a2dd90d355
8 changed files with 155 additions and 14 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