Module: ActiveRecord::Acts::MuckOauthUser::ClassMethods
- Defined in:
- lib/active_record/acts/muck_oauth_user.rb
Instance Method Summary collapse
-
#acts_as_muck_oauth_user ⇒ Object
acts_as_muck_oauth_user
adds Oauth capabilities to a user.
Instance Method Details
#acts_as_muck_oauth_user ⇒ Object
acts_as_muck_oauth_user
adds Oauth capabilities to a user. Currently, muck-oauth supports the following services: twitter google linkedin yahoo fire_eagle flickr friend_feed After adding this method to a user you will be able to call methods against these services ie: user.linked_in.client.profile
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/active_record/acts/muck_oauth_user.rb', line 21 def acts_as_muck_oauth_user has_many :client_applications has_many :tokens, :class_name => "OauthToken", :order => "authorized_at desc", :include => [:client_application], :dependent => :destroy has_one :twitter, :class_name => "TwitterToken" has_one :google, :class_name => "GoogleToken" has_one :linked_in, :class_name => "LinkedinToken" has_one :yahoo, :class_name => "YahooToken" has_one :fire_eagle, :class_name => "FireeagleToken" has_one :flickr, :class_name => "FlickrToken" has_one :friend_feed, :class_name => "FriendfeedToken" include ActiveRecord::Acts::MuckOauthUser::InstanceMethods extend ActiveRecord::Acts::MuckOauthUser::SingletonMethods end |