Added authorization

This commit is contained in:
Mike Slemmer 2012-11-12 23:40:06 -08:00
parent b2880dc65a
commit 1a81f6b58b
2 changed files with 14 additions and 0 deletions

View File

@ -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"

View File

@ -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