Sha256: acf9412ea5b9b254754d0f03bb75af8a9169de7d76233c481a47fd38f23d22dc
Contents?: true
Size: 437 Bytes
Versions: 9
Compression:
Stored size: 437 Bytes
Contents
class CASino::ProxyGrantingTicket < ActiveRecord::Base include CASino::ModelConcern::Ticket self.ticket_prefix = 'PGT'.freeze before_validation :ensure_iou_present validates :ticket, uniqueness: true validates :iou, uniqueness: true belongs_to :granter, polymorphic: true has_many :proxy_tickets, dependent: :destroy private def ensure_iou_present self.iou ||= create_random_ticket_string('PGTIOU') end end
Version data entries
9 entries across 9 versions & 1 rubygems