Test for address's multiple streets

This commit is contained in:
Andres Keskküla 2014-08-13 14:29:22 +03:00
parent d81b346035
commit 15d267a07d

View file

@ -9,8 +9,12 @@ xml.epp_head do
xml.tag!('contact:name', @contact.name)
xml.tag!('contact:org', @contact.org_name)
xml.tag!('contact:addr') do
xml.tag!('contact:street', @contact.address.street)
xml.tag!('contact:street', @contact.address.city)
@contact.address do |address|
xml.tag!('contact:street', address.street) if address.street
xml.tag!('contact:street', address.street2) if address.street2
xml.tag!('contact:street', address.street3) if address.street3
xml.tag!('contact:cc', address.try(:country).try(:iso)) unless address.try(:country).nil?
end
end
xml.tag!('contact:voice', @contact.phone)
xml.tag!('contact:fax', @contact.fax)