Method: Formbuilder::ResponseFieldAddress#audit_response
- Defined in:
- app/models/formbuilder/response_field_address.rb
#audit_response(value, all_responses) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'app/models/formbuilder/response_field_address.rb', line 63 def audit_response(value, all_responses) begin coords = Geocoder.coordinates("#{value['street']} #{value['city']} " + "#{value['state']} #{value['zipcode']} #{value['country']}") all_responses["#{self.id}_x"] = coords[0] all_responses["#{self.id}_y"] = coords[1] rescue all_responses["#{self.id}_x"] = nil all_responses["#{self.id}_y"] = nil end end |