Sha256: e63de95d899e30139fd6ffc006d48101aaeb8796c8b8fedecf6b825fd0bccced
Contents?: true
Size: 704 Bytes
Versions: 8
Compression:
Stored size: 704 Bytes
Contents
# == Schema Information # # Table name: contacts # # id :integer not null, primary key # customer_id :integer # last_name :string(50) # first_name :string(50) # email :string(100) # created_at :datetime # updated_at :datetime # contact_type :string(20) # module CgAppBase class Contact < ActiveRecord::Base include AttributesNormalizer default_scope { order(display: :desc, first_name: :asc) } def excluded_normalized_attrs [:email] end has_paper_trail validates :last_name, :first_name, :presence => true has_many :phones, dependent: :destroy accepts_nested_attributes_for :phones, allow_destroy: true end end
Version data entries
8 entries across 8 versions & 1 rubygems