Class: CgAppBase::Address
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CgAppBase::Address
show all
- Includes:
- AttributesNormalizer
- Defined in:
- app/models/cg_app_base/address.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
#excluded_normalized_attrs, #normalize_attributes
Instance Attribute Details
#postal_code_id ⇒ Object
Returns the value of attribute postal_code_id.
38
39
40
|
# File 'app/models/cg_app_base/address.rb', line 38
def postal_code_id
@postal_code_id
end
|
Instance Method Details
#attr_presence_not_required? ⇒ Boolean
46
47
48
|
# File 'app/models/cg_app_base/address.rb', line 46
def attr_presence_not_required?
false
end
|
#clean_up ⇒ Object
42
43
44
|
# File 'app/models/cg_app_base/address.rb', line 42
def clean_up
self.adr_1.strip!
end
|
#to_s ⇒ Object
50
51
52
|
# File 'app/models/cg_app_base/address.rb', line 50
def to_s
"#{self.door_no} #{self.adr_1} #{self.adr_2}, #{'apt.' + self.apt unless self.apt.blank?} #{self.city} #{self.postal_code}"
end
|