sferik/rails_admin — pull request #1774 by martndemus (2013-09-30 15:50:34+00:00)
Title: Fix: foreign key fields should not be filtered with blank/present operators

Error causing this issue:
```
ActiveRecord::StatementInvalid - PG::InvalidTextRepresentation: ERROR: invalid input syntax for integer: ""
LINE 1: ...(things.user_id IS NOT NULL AND things.user_id != '')) ORDE...
```

How to reproduce:
Add a is blank or is present filter on a belongs to association and then click the refresh button.

Whats happening?:
The foreign key column is an integer type, postgres can not compare numeric types to empty string, so the `column != ''` or `column = ''` part in the filter triggers a postges error.

Possible fix:
Using not null and null filters instead of is blank and is present filters.