Sha256: 5bd61474992d33ba40e4bc7541a16b300c8621a605b94cca413d0d837b59ef97

Contents?: true

Size: 328 Bytes

Versions: 1

Compression:

Stored size: 328 Bytes

Contents

module IdentityClient
  class User < ActiveRecord::Base
    has_one :access_grant

    def self.create_with_omniauth(auth)
      create! do |user|
        user.provider = auth["provider"]
        user.uid = auth["uid"]
        user.name = "#{auth["info"]['first_name']} #{auth['info']['last_name']}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
identity_client-0.1.3 app/models/identity_client/user.rb