rails/rails — pull request #6521 by Empact (2012-05-28 20:44:39+00:00)
Title: Handle ThrowResult in #exists? when called with #includes, #limit and an empty result

Currently the included test blows up with ThrowResult. rake test_postgresql runs green.

See FinderMethods#construct_limited_ids_condition for the raise point.

IMO this should go into 3-2-stable also, as it's a straight-forward fix.