On Wed, Apr 22, 2009 at 10:51 AM, Pratik <pratikn...@gmail.com> wrote: > > Which problem is it solving for you ? Do you see any performance gains > that I'm missing ? Do you believe if this is making any code easier to > understand ? Could you please provide failing tests which are to be > fixed by the refactoring in question ?
I believe that Adam already addresses many of these points in his original post: "This inheritance relationship has already caused its share of bugs, as mentioned by commenters on the ticket. I fixed two here: http://rails.lighthouseapp.com/projects/8994/tickets/895-has_one-through-errors. More importantly, the added complexity created by importing all of the collection logic and interface into a non-collection association class just adds to rigidity and potential for odd bugs in the future." It is hard to write a failing test for bugs that don't exist, but the existence of prior already-fixed bugs should be considered as a motivation for doing the refactor. Furthermore, the existence of bugs isn't normally the primary motivation for refactoring - but they are a symptom of a needed refactoring. Complex, hard-to-understand code is a direct motivation for refactoring, which I think is the point here. -- Chad --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---