gregbell/active_admin — pull request #3042 by beatrichartz (2014-04-03 20:25:27+00:00)
Title: ! fix for comparison of Array with Array failed in sortable when updating existing records

I have regularly run into this error recently when using the sortable option in ``has_many``: ``comparison of Array with Array failed``. It is caused by the `sort_by` in sortable when both existing records with a present sortable column and new records with either present or not present sortable column are updated together.

This PR fixes this by pushing all records with a blank sortable attribute to the end of the list.

However I don't know if this is a sensible default for everyone using this feature. There are other possiblities I thought about:

- Defaults for the sortable attribute, however I think this should not be Active Admin's concern.
- Raise a more descriptive error when the sortable attribute is ``nil``

Looking forward to discussing this.