patches review request

Hi all.

Please review the following patches: - http://dev.rubyonrails.org/ticket/10529 (has_many through query building fix) - http://dev.rubyonrails.org/ticket/10531 (pretty printing support for activerecord classes and instances)