sferik/rails_admin — pull request #1229 by rovermicrover (2012-06-30 00:57:09+00:00)
Title: fix to # polymorphic-association ajax request.

Relating to the following issue
https://github.com/sferik/rails_admin/issues/1228

Which boils down to polymorphic-association not updating via ajax correctly.

# polymorphic-association in ra.widgets.coffee was calling on line 123

```coffee
$(data).each (i, el) ->
```

on the returned ajax object, ie data. Only issue was that the data was not the array. Rather the array was at data.main. So the issue was fixed for me when i changed the above to

```coffee
$(data.main).each (i, el) ->
```

which seems to solve the issue.

I hope this helps, and let me know if I didn't explain something properly.