Count is broken in Rails 2.3.2

by Justin Ball on March 18th, 2009

After upgrading to Rails 2.3.2 I started getting this error:
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*)

It turns out that the 'count' method is broken for 'has_many through association collection with named scope'. Here's a link to the bug report:
http://rails.lighthouseapp.com/projects/8994/tickets/2189

From Funny

  • Holy (&%@!

    WillPaginate triggers this bug, so it's kinda a big deal. Luckily the patch from the ticket works.
blog comments powered by Disqus