Papercloud/active_admin_geocomplete — pull request #3 by antonivanopoulos (2014-09-18 06:11:18+00:00)
Title: Feature/multiple instances

Previously, if you used the active_admin/geocomplete partial more than once on the one page (i.e. if using nested forms and there was a location for each resource that was nested), the geocomplete instances would clash and if you updated one, the other maps would get updated with the same result.

I've put a class on the form.inputs call, and rejigged the JS so that it does the setup for each instance of the class on the page. Also pulled out hardcoded references to classes and elements for geocomplete, and now they get pulled in relative to the wrapper they are within.

Final result: You can render the partial as many times as you want, as long as you provide a unique ID for the map canvas.