Sha256: b10ca82eb9d43829abf1a09a2e60a24c26e191212825b1d6e62a7544f0402bc5

Contents?: true

Size: 687 Bytes

Versions: 12

Compression:

Stored size: 687 Bytes

Contents

module SharedUser
  extend ActiveSupport::Concern

  included do
    devise :database_authenticatable, :confirmable, :lockable, :recoverable,
           :registerable, :rememberable, :timeoutable,
           :trackable, :validatable, :omniauthable

    attr_accessor :other_key

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

  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
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
devbootsrap-0.0.7 test/rails_app/lib/shared_user.rb
devbootsrap-0.0.6 test/rails_app/lib/shared_user.rb
devbootsrap-0.0.5 test/rails_app/lib/shared_user.rb
devbootsrap-0.0.4 test/rails_app/lib/shared_user.rb
devbootsrap-0.0.3 test/rails_app/lib/shared_user.rb
devbootsrap-0.0.2 test/rails_app/lib/shared_user.rb
devbootsrap-0.0.1 test/rails_app/lib/shared_user.rb
devise-3.2.4 test/rails_app/lib/shared_user.rb
devise-3.2.3 test/rails_app/lib/shared_user.rb
devise-3.2.2 test/rails_app/lib/shared_user.rb
devise-3.2.1 test/rails_app/lib/shared_user.rb
devise-3.2.0 test/rails_app/lib/shared_user.rb