Replace newlines in contacts import

This commit is contained in:
Martin Lensment 2015-04-07 10:50:20 +03:00
parent e64622b372
commit cc9384eafa
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@
%dd= @contact.org_name %dd= @contact.org_name
%dt= t(:street) %dt= t(:street)
%dd= @contact.street %dd= @contact.street.gsub("\n", '<br>').html_safe
%dt= t(:city) %dt= t(:city)
%dd= @contact.city %dd= @contact.city

View file

@ -166,7 +166,7 @@ namespace :import do
user, user,
x.country.try(:strip), x.country.try(:strip),
x.id, x.id,
[x.street1.try(:strip), x.street2.try(:strip), x.street3.try(:strip)].join('\n'), [x.street1.try(:strip), x.street2.try(:strip), x.street3.try(:strip)].join("\n"),
x.city.try(:strip), x.city.try(:strip),
x.postalcode.try(:strip), x.postalcode.try(:strip),
x.stateorprovince.try(:strip), x.stateorprovince.try(:strip),