Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
omniauth and user models (this is just for demo)
class User < ActiveRecord::Base
has_many :authorizations, :dependent => :destroy
class Authorization < ActiveRecord::Base
belongs_to :user
validates_presence_of :user_id, :uid, :provider
validates_uniqueness_of :uid, :scope => :provider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.