Sha256: 41bdcf670043265c85cee0055aeb89e3e78b083b818f48551b525a04fc1233ef
Contents?: true
Size: 615 Bytes
Versions: 15
Compression:
Stored size: 615 Bytes
Contents
class Identity < ActiveRecord::Base belongs_to :profile validates :name, presence: true, uniqueness: {scope: :provider} validates :provider, presence: true def self.find_for_oauth(auth) where(name: auth.uid, provider: auth.provider).first_or_create end end # == Schema Information # # Table name: identities # # id :integer not null, primary key # name :string # email :string # password_digest :string # profile_id :integer # created_at :datetime not null # updated_at :datetime not null # provider :string #
Version data entries
15 entries across 14 versions & 2 rubygems