Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Brian Durand's latest activity

Tuesday, January 05 2010
2991 After Transaction Patch was updated in Ruby on Rails
  • Brian Durand
    Brian Durand commented at 3:44 PM

    I didn't include a before_commit or before_rollback in the patch just because of the nature of the issue.

    When a transaction is ready to be committed, it should...

Monday, September 14 2009
2991 After Transaction Patch was updated in Ruby on Rails
  • Brian Durand
    • Tag changed from 2.3.4, active_record, transaction to 3.0, active_record, transaction
    by Brian Durand at 3:57 PM

    Redirecting / reloading doesn't fix the problem and will lose any validation errors that should be displayed to the user. The bigger issue, though, is that it c...

Monday, August 10 2009
2873 Application reloading should be deferred to end of request, currently interfe... was updated in Ruby on Rails
  • Brian Durand
    Brian Durand commented at 6:57 PM

    I've applied this patch locally, and now I have a problem with the lock not being released. In my case, I posted an invalid XML document to an action which caus...

Tuesday, August 04 2009
2991 After Transaction Patch was created in Ruby on Rails
  • Brian Durand
    Brian Durand created the ticket at 3:36 AM

    This patch provides hooks for callbacks after a transaction rolls back or commits. It is intended to address some inconsistencies with the current Rails code as...

Friday, March 06 2009
2137 Allow find_in_batches to use :order, :limit, and :offset was updated in Ruby on Rails
  • Brian Durand
    Brian Durand commented at 3:28 PM

    One other thing I'd like to add is that this code makes the functionality more consistent with the behavior of database cursors where once a cursor is opened (a...

Thursday, March 05 2009
2137 Allow find_in_batches to use :order, :limit, and :offset was updated in Ruby on Rails
  • Brian Durand
    Brian Durand commented at 11:39 PM

    Sorry, that should have been (my formatting skills are off)

    
    Post.all(options).each do |post|
      # do something end
    and
    
    
    Post.each(options) do |post|
      ...
  • Brian Durand
    Brian Durand commented at 11:37 PM

    To clarify just a little bit, I think the functionality here should be equivalent:

    @@@ruby Post.all(options).each do |post| # do something end

    
    
    and
    
    @@@ru...
  • Brian Durand
    Brian Durand commented at 11:29 PM

    Data cleanup or munging is an example where record order might make sense. You may need to process all records, but some records are more active than others. So...

  • Brian Durand
    • Title changed from Allow find_batches to use :order, :limit, and :offset to Allow find_in_batches to use :order, :limit, and :offset
    by Brian Durand at 5:57 PM

    Also allows iterating over records with non-integer primary keys

  • Brian Durand
    Brian Durand created the ticket at 5:53 PM

    Attached is a patch for ActiveRecord::Batches which removes the restriction on not being able to specify :order, :offset, and :limit on batch iterations. The co...