gregbell/active_admin — pull request #1458 by pcreux (2012-07-02 09:20:11+00:00)
Title: Fix #items_in_collection? for SELECT with DISTINCT.

#items_in_collection? returns false even if there are items on a select with a distinct clause.

For example:
```ruby
class User
def posts
Post.joins(:blogs).where('blog.user_id' => current_user.id).uniq
end
end

User.first.posts
# => select distinct "posts".*....

User.first.posts.exists?
# => select distinct(1) ....
# => false
```

Let me know if you think I should write a regression test.