Sha256: b6dfd3201971da24f929390c47f432bb94bc2d3cb9329a65e455d06da2a3a0d5

Contents?: true

Size: 370 Bytes

Versions: 23

Compression:

Stored size: 370 Bytes

Contents

# A company record, mainly an organizational tool for Contacts
#
class Company < ActiveRecord::Base
  include E9Rails::ActiveRecord::AttributeSearchable

  has_many :contacts, :dependent => :restrict

  validates :name, :presence   => true, :uniqueness => { :allow_blank => true, :case_sensitive => false }

  scope :ordered, lambda { order(arel_table[:name].asc) }
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
e9_crm-0.1.34 app/models/company.rb
e9_crm-0.1.33 app/models/company.rb
e9_crm-0.1.32 app/models/company.rb
e9_crm-0.1.31 app/models/company.rb
e9_crm-0.1.30 app/models/company.rb
e9_crm-0.1.29 app/models/company.rb
e9_crm-0.1.28 app/models/company.rb
e9_crm-0.1.27 app/models/company.rb
e9_crm-0.1.26 app/models/company.rb
e9_crm-0.1.25 app/models/company.rb
e9_crm-0.1.24 app/models/company.rb
e9_crm-0.1.23 app/models/company.rb
e9_crm-0.1.22 app/models/company.rb
e9_crm-0.1.21 app/models/company.rb
e9_crm-0.1.20 app/models/company.rb
e9_crm-0.1.19 app/models/company.rb
e9_crm-0.1.18 app/models/company.rb
e9_crm-0.1.17 app/models/company.rb
e9_crm-0.1.16 app/models/company.rb
e9_crm-0.1.14 app/models/company.rb