construct_sql is executed in the initialize method of the association and it handles the substitution of the sql.Ah, thanks. So the bug is that it doesn't do the right thing if the finder_sql has newlines (the regex needs to be modified). I'll submit a patch.
patch submitted as:
http://dev.rubyonrails.org/attachment/ticket/3540
_______________________________________________
Rails-core mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-core
