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.

There was a problem

You must be a member of this account.

Troels Petersen's latest activity

Friday, September 24 2010
5439 [Patch] ActiveRecord::Timestamp#touch still fails when no updated_at/on colum... was updated in Ruby on Rails
  • Troels Petersen
    • Title changed from ActiveRecord::Timestamp#touch fails when no updated_at/on column is present to [Patch] ActiveRecord::Timestamp#touch still fails when no updated_at/on column is present
    by Troels Petersen at 6:56 PM

    Here is a patch to restore the behavior of touch on an arbitrary (date or datetime) attribute.

    The point is that since touch has been generalized to update any ...

Thursday, September 23 2010
5439 ActiveRecord::Timestamp#touch fails when no updated_at/on column is present was updated in Ruby on Rails
  • Troels Petersen
    Troels Petersen commented at 7:20 PM

    The patch seems to do the opposite of what was intended:

    def touch(name = nil)

    attributes = timestamp_attributes_for_update_in_model
    unless attributes.blank?
     ...
Sunday, January 17 2010
3727 Arel gives invalid SQL for empty array was created in Ruby on Rails
  • Troels Petersen
    Troels Petersen created the ticket at 8:19 PM

    ActiveRecord <= 2.3 accepts an empty array as a condition on an attribute, but Arel turns it into invalid SQL:

    User.all( :conditions => { :id => [] } )

    ActiveRe...

Friday, May 16 2008
211 ActiveRecord count with :group and :include fails for sqlite was created in Ruby on Rails
  • Troels Petersen
    Troels Petersen created the ticket at 9:07 PM

    The method construct_calculation_sql in calculations.rb constructs invalid SQL when connection.supports_count_distinct? is false, eg for sqlite:

    Comment.count...