rails/rails — pull request #4631 by jm (2012-01-23 21:57:57+00:00)
Title: Fix counter cache column name if :inverse_of is specified on belongs_to

This gist explains what problem I'm fixing: https://gist.github.com/1665503

This patch adds a test and a small amount of code to fix the issue. Sorry for the stupid merging master commit. I can't seem to figure out how to get it to behave and don't have time to wrestle with git to fix it. :)