jam-cloud/ruby/lib/jam_ruby/models/user_authorization.rb

17 lines
394 B
Ruby
Raw Normal View History

2012-11-13 07:40:06 +00:00
module JamRuby
class UserAuthorization < ActiveRecord::Base
2012-11-15 09:30:55 +00:00
attr_accessible :provider, :uid, :token, :token_expiration
self.table_name = "user_authorizations"
2012-11-13 07:40:06 +00:00
self.primary_key = 'id'
2012-11-15 09:30:55 +00:00
belongs_to :user, :class_name => "JamRuby::User", :foreign_key => "user_id"
2012-11-13 07:40:06 +00:00
validates :provider, :uid, :presence => true
2012-11-15 09:30:55 +00:00
# token and token_expiration can be missing
2012-11-13 07:40:06 +00:00
end
end