rails/rails — pull request #14995 by fredwu (2014-05-06 14:54:54+00:00)
Title: Habtm relation size calculation fix 4 0 stable

HABTM should not include new records as part of #count_records as new records are already counted.

This addresses #14914 for the 4-0-stable branch, and is a different approach to #14969 which addresses the same issue.

cc @rafaelfranca @bigxiang