Acts As Google Account plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install svn://rubyforge.org/var/svn/asgoogleaccount
Simple Example
class User < ActiveRecord::Base acts_as_google_account def self.login(username, password) if username.include? "@gmail.com" then if self.GoogleLogin(username, password) then find_by_email(username) end else hashed_password = hash_password(password || "") find(:first, :conditions => ["username = ? and hashed_password = ?", username, hashed_password]) end end def try_to_login User.login(self.username, self.password) end end
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: hardway, 7 months ago

