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" end 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? Thanks, Pablo -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.