Reputation: 1111
It's quite common these days for site input forms for home address to ask the user for zip/post code and then provide drop down options to the user to select the entire address after having done a lookup from the zip/post code.
Is there a ruby gem or good API to get this functionality integrated into a RoR application?
Upvotes: 1
Views: 724
Reputation: 1343
I've had a good experience with Area...
zip = 35205
city, state = zip.to_region(city: true), zip.to_region(state: true)
I don't know of any libraries with view helpers for generating such a form, you'd have to build it yourself as far as I know. Shouldn't be much trouble.
Upvotes: 2