Sha256: f6dd55d4b0ed29d1b2243f90e9c89aeda14318adc48bfaf3380b0aa4ba68474c

Contents?: true

Size: 310 Bytes

Versions: 1

Compression:

Stored size: 310 Bytes

Contents

class Account < MLS::Model

  include MLS::Avatar

  has_one :lead, foreign_key: :account_id

  belongs_to :organization

  has_many :agencies, :inverse_of => :agent, :foreign_key => :agent_id
  has_many :emails, :dependent => :destroy do
    def primary
      where(:primary => true).first
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mls-1.3.0 lib/mls/account.rb