Sha256: 0361fdde85dc3b3c8591696eb3c1ed1e43ec46bb270d158ab71402b0f4020de5
Contents?: true
Size: 411 Bytes
Versions: 33
Compression:
Stored size: 411 Bytes
Contents
class Agent < ActiveRecord::Base include Redis::Objects::RMap has_rmap({:id => lambda{|x| x.to_s}}, :title) has_paper_trail # # RELATIONS # scope :root, where(:agent_id => nil) has_many :terminals has_many :agents has_many :commissions has_many :payments, :order => 'id DESC' belongs_to :agent # # VALIDATIONS # validates :title, :presence => true, :uniqueness => true end
Version data entries
33 entries across 33 versions & 1 rubygems