Sha256: 32733853e85f37cc4cff8bd4a72fe8a112a90240562355abc2f4f7f4a93b3d79
Contents?: true
Size: 518 Bytes
Versions: 6
Compression:
Stored size: 518 Bytes
Contents
class Address < ActiveRecord::Base belongs_to :country belongs_to :person serialize :form_attributes validates :country_id, :address, :city, :presence => true # Returns address in a string <i>#{firstname} #{name} #{address} #{zip_code} #{city}</i> def to_s "#{I18n.t civility, :scope => [:civility, :label]} #{firstname} #{name} #{address} #{zip_code} #{city} #{country.name.upcase}" end def kind read_attribute(:type) end def kind=(kind) write_attribute(:type, kind) end end
Version data entries
6 entries across 6 versions & 1 rubygems