sferik/rails_admin — Issue #775: Ajax return values populating all select boxes
Author: sbrisko
Created: 2011-10-13 20:24:16+00:00
State: open

If you have a page with multiple select boxes (either single or multiple), when you use the Create [Model] link to open a modal and create a new related model, the return value (id and label) are populated into every select box which you also created a new model for via link/modal/ajax.

It looks like it's happening in ra.remote-form.js starting at line 98, when the parent pages form is being bound with live on the ajax:complete, maybe the widget var is keeping a list of all elements that have been triggered vs the last element.

I would have tried thought out by overriding the file in /assets/rails_admin/ in my main app, but the pipeline does not seem to be picking that up.