I am using the geocoder gem to reverse geocode a location given the latitude and longitude of an object. This works great, however, I would like to change the result so that only the desired part of the complete address is shown.
In some specific cases, I only want to remove the last bit of the output, and so I am simply using something like:
<%= @object.address.to_s.chomp(', USA') %>
for any given instance.
However, I would like to know if there is a more dynamic option to return only the zip code, only the country, etc.