fix support for rails 3.2 - issues with searching by a poly assoc