Sha256: 5b64b2a61577a0063a20db1d98ddbb5df8647cfc21cbe7aaae4cca8b1804d2a5
Contents?: true
Size: 414 Bytes
Versions: 8
Compression:
Stored size: 414 Bytes
Contents
class Client < ActiveRecord::Base has_many :access_tokens has_many :refresh_tokens before_validation :setup, :on => :create validates :name, :website, :redirect_uri, :secret, :presence => true validates :identifier, :presence => true, :uniqueness => true private def setup self.identifier = ActiveSupport::SecureRandom.base64(16) self.secret = ActiveSupport::SecureRandom.base64 end end
Version data entries
8 entries across 8 versions & 2 rubygems