Sha256: a968f89db726824e35be5248596a812f80e0daaf6e19c7d9b691eeae26cda2bb

Contents?: true

Size: 570 Bytes

Versions: 33

Compression:

Stored size: 570 Bytes

Contents

module CabooseStore
  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

33 entries across 33 versions & 1 rubygems

Version Path
caboose-store-0.0.43 app/models/caboose_store/address.rb
caboose-store-0.0.42 app/models/caboose_store/address.rb
caboose-store-0.0.41 app/models/caboose_store/address.rb
caboose-store-0.0.40 app/models/caboose_store/address.rb
caboose-store-0.0.39 app/models/caboose_store/address.rb
caboose-store-0.0.38 app/models/caboose_store/address.rb
caboose-store-0.0.37 app/models/caboose_store/address.rb
caboose-store-0.0.36 app/models/caboose_store/address.rb
caboose-store-0.0.35 app/models/caboose_store/address.rb
caboose-store-0.0.34 app/models/caboose_store/address.rb
caboose-store-0.0.33 app/models/caboose_store/address.rb
caboose-store-0.0.32 app/models/caboose_store/address.rb
caboose-store-0.0.31 app/models/caboose_store/address.rb
caboose-store-0.0.30 app/models/caboose_store/address.rb
caboose-store-0.0.29 app/models/caboose_store/address.rb
caboose-store-0.0.28 app/models/caboose_store/address.rb
caboose-store-0.0.27 app/models/caboose_store/address.rb
caboose-store-0.0.26 app/models/caboose_store/address.rb
caboose-store-0.0.25 app/models/caboose_store/address.rb
caboose-store-0.0.24 app/models/caboose_store/address.rb