Class: KktShoppe::Address
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- KktShoppe::Address
- Defined in:
- app/models/kkt_shoppe/address.rb
Constant Summary collapse
- TYPES =
An array of all the available types for an address
["billing", "delivery"]
Instance Method Summary collapse
-
#country ⇒ KktShoppe::Country
The country which this address should be linked to.
-
#customer ⇒ KktShoppe::Customer
The customer which this address should be linked to.
- #full_address ⇒ Object
-
#order ⇒ KktShoppe::Order
The order which this address should be linked to.
Instance Method Details
#country ⇒ KktShoppe::Country
The country which this address should be linked to
23 |
# File 'app/models/kkt_shoppe/address.rb', line 23 belongs_to :country, :class_name => "KktShoppe::Country" |
#customer ⇒ KktShoppe::Customer
The customer which this address should be linked to
13 |
# File 'app/models/kkt_shoppe/address.rb', line 13 belongs_to :customer, :class_name => "KktShoppe::Customer" |
#full_address ⇒ Object
39 40 41 |
# File 'app/models/kkt_shoppe/address.rb', line 39 def full_address [address1, address2, address3, address4, postcode, country.try(:name)].join(", ") end |
#order ⇒ KktShoppe::Order
The order which this address should be linked to
18 |
# File 'app/models/kkt_shoppe/address.rb', line 18 belongs_to :order, :class_name => "KktShoppe::Order" |