Mark Reginald James
2006-Aug-31 06:39 UTC
Model.sum returns nil when no rows are selected. Intentional?
Is it intended that the AR sum method return nil rather than 0 (int) or 0.0 (float) when no rows match the conditions? This is the result I get using MySQL. I can''t find any mention of this issue in either Trac or the mailing list archives, so I''ll make up a patch if there''s confirmation this is not the desired behaviour. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---