On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > On 3/26/06, Andrew Kaspick <[EMAIL PROTECTED]> wrote: > > On 3/26/06, Michael Koziarski <[EMAIL PROTECTED]> wrote: > > > > The reason I created this patch is explained in the ticket and that I > > > > figured the :include route was a bit cleaner from a users perspective > > > > than a combo of :select and :joins. > > > > > > The patch no longer applies cleanly, and seems to cause quite a few > > > failures (unless I've screwed up the merge). Could you post an > > > updated version? I'm happy to apply this if we can get it merged and > > > tested in time. > > > > > > -- > > > Cheers > > > > > > Koz > > > > I'll take another look right away. I know I received a conflict with > > it when I did an update today. > > > > I'll report back shortly. > > > > I get the following without the patch... > > test_create_table_with_binary_column(MigrationTest) > [./test/migration_test.rb:470]: > <""> expected but was > <nil>. > > With the patch I seem to be getting 5 extra errors and the above > failure. I'll look into the errors right now. >
I have submitted a new patch file for http://dev.rubyonrails.org/ticket/4132 that no longer produces any conflicts or errors during the unit tests. I'm not sure if my implemention of "merge_includes" (in activerecord/lib/active_record/base.rb) is ideal though... # Merge includes so that the result is a valid +include+ def merge_includes(first, second) array_wrap = lambda { |val| val.is_a?(Array) ? val : ([val] unless val.nil?) } Array(array_wrap.call(first)) + Array(array_wrap.call(second)) end This is supposed to combine :include's in a compatible fashion since they can either be an Array, Hash or a Symbol. So if you have a better, alternate method of doing this then please feel free to modify it or I can merge any suggestions. Thanks again, Andrew _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core