rails/rails — pull request #12544 by phoenixek12 (2013-10-15 13:18:51+00:00)
Title: fixes issue if grouped association ids are all NULL in calculation

If you execute calculation grouped by association field and there are only NULL values, it throws ActiveRecord::RecordNotFound. It is diff just to show where the problem is better than in words, if anyone repairs it to other branch or in different style, please do that :)