added user edit, show view info and spec for user profile update
This commit is contained in:
parent
c48c8afa51
commit
a2dd90d355
8 changed files with 155 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue