I’m trying to use the :group option in an ActiveRecord association. I
wrote the code as follows:
class User < ActiveRecord::Base
has_many :messages, :group => “thread”, :order => “created_at desc”
It works fine as it returns some records. The problem is that the mysql
clause “GROUP BY” ignores NULL values. That makes that records with
thread == NULL not to show.
Â¿Is there a rails option to include NULL values when using :group?