### Home Classes Methods

### In Files

- app/models/user.rb

### Parent

ActiveRecord::Base

### Methods

- ::find_for_facebook_oauth
- ::find_for_open_id
- ::new_with_session

### Files

- README_FOR_APP

### Class Index

Quicksearch

- LastFM
- LastFM::Album
- LastFM::Artist
- LastFM::Chart
- LastFM::Request
- LastFM::Track
- LastFM::Validator
- DeviseAuth
- DeviseAuth::RegistrationsController
- DeviseAuth::SessionsController
- Users
- Users::OmniauthCallbacksController
- ApplicationController
- ApplicationHelper
- Artist
- ArtistsController
- ChartsController
- HomeController
- Playlist
- PlaylistsTracks
- RedisQueryable
- SearchController
- Track
- TracksController
- User
- UsersController
- UsersHelper
- YoutubeVideoRating

No matching classes.

# User

### Public Class Methods

find_for_facebook_oauth(access_token, signed_in_resource=nil) click to toggle source

        # File app/models/user.rb, line 21
    21:   def self.find_for_facebook_oauth(access_token, signed_in_resource=nil)

    22:     data = access_token['extra']['user_hash']

    23:     if user = User.find_by_email(data["email"])

    24:       user

    25:     else # Create a user with a stub password.

    26:       User.create!(:email => data["email"], :password => Devise.friendly_token[0,20])

    27:     end

    28:   end

find_for_open_id(access_token, signed_in_resource=nil) click to toggle source

        # File app/models/user.rb, line 30
    30:   def self.find_for_open_id(access_token, signed_in_resource=nil)

    31:     data = access_token['user_info']

    32:     if user = User.find_by_email(data["email"])

    33:       user

    34:     else # Create a user with a stub password.

    35:       User.create!(:email => data["email"], :password => Devise.friendly_token[0,20])

    36:     end

    37:   end

new_with_session(params, session) click to toggle source

        # File app/models/user.rb, line 13
    13:   def self.new_with_session(params, session)

    14:     super.tap do |user|

    15:       if data = session["devise.facebook_data"] && session["devise.facebook_data"]["extra"]["user_hash"]

    16:         user.email = data["email"]

    17:       end

    18:     end

    19:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.