Patrick Joyce
2009-Mar-03 20:57 UTC
[PATCH] AssociationCollection.count Can Return Incorrect Value
I was hoping to find some reviewers for my patch. AssociationCollection.count can return an incorrect value if a finder_sql is a multiline string and there is a new line character immediately following "SELECT". I ran into this when I was writing a long :finder_sql query for a has_many association and I wanted to split the query on to multiple lines for readability purposes. This issue affects HasManyAssociations, HasAndBelongToManyAssociations, and HasManyThroughAssociations. There are more details on the problem and the implementation of the patch in the lighthouse ticket: http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2118-associationcollectioncount-returns-incorrect-value Thanks! - Patrick Joyce --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---