Sha256: dc57e3e149d3696e2adb698a31bed3b741d7eab783044edac6b2895597e15f42

Contents?: true

Size: 670 Bytes

Versions: 8

Compression:

Stored size: 670 Bytes

Contents

class User < ActiveRecord::Base
  devise  :database_authenticatable, :confirmable, :lockable, :recoverable,
          :registerable, :rememberable, :timeoutable, :token_authenticatable,
          :trackable, :validatable, reconfirmable: false

  attr_accessor :other_key

  def raw_confirmation_token
    @raw_confirmation_token
  end

  module ExtendMethods
    def new_with_session(params, session)
      super.tap do |user|
        if data = session["devise.facebook_data"]
          user.email = data["email"]
          user.confirmed_at = Time.now
        end
      end
    end
  end

  # They need to be included after Devise is called.
  extend ExtendMethods
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
devise-token_authenticatable-1.1.0 spec/support/rails_app/app/models/user.rb
devise-token_authenticatable-1.0.2 spec/support/rails_app/app/models/user.rb
devise-token_authenticatable-1.0.1 spec/support/rails_app/app/models/user.rb
devise-token_authenticatable-1.0.0 spec/support/rails_app/app/models/user.rb
devise-token_authenticatable-0.5.3 spec/support/rails_app/app/models/user.rb
devise-token_authenticatable-0.5.2 spec/support/rails_app/app/models/user.rb
devise-token_authenticatable-0.5.1 spec/support/rails_app/app/models/user.rb
devise-token_authenticatable-0.5.0 spec/support/rails_app/app/models/user.rb