Class: Address

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/address.rb

Instance Method Summary collapse

Instance Method Details

#kindObject



14
15
16
# File 'app/models/address.rb', line 14

def kind
  read_attribute(:type)
end

#kind=(kind) ⇒ Object



18
19
20
# File 'app/models/address.rb', line 18

def kind=(kind)
  write_attribute(:type, kind)
end

#to_sObject

Returns address in a string #firstname #name #address #zip_code #city



10
11
12
# File 'app/models/address.rb', line 10

def to_s
  "#{I18n.t civility, :scope => [:civility, :label]} #{firstname} #{name} #{address} #{zip_code} #{city} #{country.name.upcase}"
end