1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00
heartcombo--devise/lib/devise/models/omniauthable.rb

23 lines
573 B
Ruby
Raw Normal View History

2010-10-14 14:04:02 -04:00
require 'devise/omniauth'
module Devise
module Models
2010-10-14 17:46:10 -04:00
# Adds OmniAuth support to your model.
2010-10-14 14:04:02 -04:00
#
# == Options
#
# Oauthable adds the following options to devise_for:
#
2010-10-14 17:46:10 -04:00
# * +omniauth_providers+: Which providers are avaialble to this model. It expects an array:
2010-10-14 14:04:02 -04:00
#
2010-10-14 17:46:10 -04:00
# devise_for :database_authenticatable, :omniauthable, :omniauth_providers => [:twitter]
2010-10-14 14:04:02 -04:00
#
module Omniauthable
extend ActiveSupport::Concern
module ClassMethods
Devise::Models.config(self, :omniauth_providers)
end
end
end
end