gregbell/active_admin — Issue #774: Sorting does not work on polymorphic association column
Author: pcreux
Created: 2011-11-22 09:51:02+00:00
State: open
Labels: Bug

Given I have:

```ruby
class BankAccount < ActiveRecord::Base
belongs_to :user, :polymorphic => true
end
```

```ruby
ActiveAdmin.register BankAccount do

index do |display|
display.column :user
end
end
```

Then the User column is sortable by `user`. (but `BankAccount.user` does not exist)

It should not be sortable by default. (sorting by `user_id` would not make sense)

This can be fixed around https://github.com/gregbell/active_admin/blob/master/lib/active_admin/views/components/table_for.rb#L136