finish settings and public recordings

This commit is contained in:
Josh
2018-06-12 17:28:02 -04:00
parent 39b687a58f
commit 8390e075e1
14 changed files with 72 additions and 72 deletions

View File

@ -8,7 +8,8 @@ class User < ApplicationRecord
validates :name, length: { maximum: 24 }, presence: true
validates :provider, presence: true
validates :email, length: { maximum: 60 }, allow_nil: true,
validates :image, format: {with: /\.(png|jpg)\Z/i}, allow_blank: true
validates :email, length: { maximum: 60 }, allow_blank: true,
uniqueness: { case_sensitive: false },
format: {with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i }
@ -56,7 +57,7 @@ class User < ApplicationRecord
end
def twitter_image(auth)
auth['info']['image']
auth['info']['image'].gsub!("_normal", "")
end
def google_name(auth)
@ -72,7 +73,7 @@ class User < ApplicationRecord
end
def google_image(auth)
auth['info']['picture']
auth['info']['image']
end
end