Sha256: 06e78b92d07935cedd780d2c97103960834375e7985ea995317efa1e334fefcb
Contents?: true
Size: 720 Bytes
Versions: 4
Compression:
Stored size: 720 Bytes
Contents
class Devise::Oauth2Providable::Client < ActiveRecord::Base has_many :access_tokens has_many :refresh_tokens has_many :authorization_codes belongs_to :user before_validation :init_identifier, :on => :create, :unless => :identifier? before_validation :init_secret, :on => :create, :unless => :secret? validates :website, :secret, :presence => true validates :name, :presence => true, :uniqueness => true validates :identifier, :presence => true, :uniqueness => true attr_accessible :name, :website, :redirect_uri, :user private def init_identifier self.identifier = Devise::Oauth2Providable.random_id end def init_secret self.secret = Devise::Oauth2Providable.random_id end end
Version data entries
4 entries across 4 versions & 1 rubygems