lib/jt-rails-address.rb in jt-rails-address-1.0.1 vs lib/jt-rails-address.rb in jt-rails-address-1.1.0

- old
+ new

@@ -72,16 +72,20 @@ data['zip_code'] = address_component['long_name'] end end - if !data['street_name'].blank? - if !data['street_number'].blank? - data['street'] = "#{data['street_number']} #{data['street_name']}" - else - data['street'] = data['street_name'] - end - end + if !data['street_name'].blank? + if !data['street_number'].blank? + data['street'] = "#{data['street_number']} #{data['street_name']}" + else + data['street'] = data['street_name'] + end + end + + if !place['place_id'].blank? + data['google_id'] = place['place_id'] + end return data rescue Exception => e STDERR.puts e.message end \ No newline at end of file