Sha256: 6ad021e0941e445bedf92069d0dd1993234ba5076d1e92f6333a22e52c2140cf

Contents?: true

Size: 565 Bytes

Versions: 61

Compression:

Stored size: 565 Bytes

Contents

module Caboose
  class Address < ActiveRecord::Base
    self.table_name = 'store_addresses'
    
    attr_accessible :id,
      :name,
      :first_name,
      :last_name,
      :street,
      :address1,
      :address2,
      :company,
      :city,
      :state,
      :province,
      :province_code,
      :zip,
      :country,
      :country_code,
      :phone
    
    validates :first_name, :last_name, :address1, :city, :state, :zip, :presence => true
    validates :zip, :format => { :with => /^\d{5}(-\d{4})?$/, :message => 'Invalid zip code' }
  end
end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
caboose-cms-0.5.64 app/models/caboose/address.rb
caboose-cms-0.5.63 app/models/caboose/address.rb
caboose-cms-0.5.62 app/models/caboose/address.rb
caboose-cms-0.5.61 app/models/caboose/address.rb
caboose-cms-0.5.60 app/models/caboose/address.rb
caboose-cms-0.5.59 app/models/caboose/address.rb
caboose-cms-0.5.58 app/models/caboose/address.rb
caboose-cms-0.5.57 app/models/caboose/address.rb
caboose-cms-0.5.56 app/models/caboose/address.rb
caboose-cms-0.5.55 app/models/caboose/address.rb
caboose-cms-0.5.54 app/models/caboose/address.rb
caboose-cms-0.5.53 app/models/caboose/address.rb
caboose-cms-0.5.52 app/models/caboose/address.rb
caboose-cms-0.5.51 app/models/caboose/address.rb
caboose-cms-0.5.50 app/models/caboose/address.rb
caboose-cms-0.5.49 app/models/caboose/address.rb
caboose-cms-0.5.48 app/models/caboose/address.rb
caboose-cms-0.5.47 app/models/caboose/address.rb
caboose-cms-0.5.46 app/models/caboose/address.rb
caboose-cms-0.5.45 app/models/caboose/address.rb