Added authorization
This commit is contained in:
parent
b2880dc65a
commit
1a81f6b58b
|
|
@ -8,6 +8,9 @@ module JamRuby
|
|||
|
||||
self.primary_key = 'id'
|
||||
|
||||
# authorizations (for facebook, etc -- omniauth)
|
||||
has_many :user_authorizations
|
||||
|
||||
# connections (websocket-gateway)
|
||||
has_many :connections, :class_name => "JamRuby::Connection"
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
module JamRuby
|
||||
class UserAuthorization < ActiveRecord::Base
|
||||
|
||||
self.table_name = "users_authorizations"
|
||||
|
||||
self.primary_key = 'id'
|
||||
|
||||
belongs_to :user
|
||||
validates :provider, :uid, :presence => true
|
||||
end
|
||||
end
|
||||
Loading…
Reference in New Issue