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.

Dim's latest activity

Thursday, November 11 2010
5953 STI type not updatable was updated in Ruby on Rails
  • Dim
    Dim commented at 6:29 PM

    Not sure, I think becomes is already doing most of the job pretty well, but it's certainly incomplete.

  • Dim
    Dim commented at 4:56 PM

    Here the links:

  • Dim
    Dim commented at 4:31 PM

    Sorry about the previous formatting issues, here again:

    Imagine you have the following scenario:

    class Employer < ActiveRecord::Base
    end
    
    class Manager < Emplo...
  • Dim
    Dim created the ticket at 4:29 PM

    Imagine you have the following scenario:

    @@@ class Employer < ActiveRecord::Base end

    class Manager < Employer
    end

    employer = Employer.find(1) # => #
    manager = e...

5954 [PATCH] ActiveRecord::Persistence#becomes does not ensure proper type was created in Ruby on Rails
  • Dim
    Dim created the ticket at 5:09 PM

    Here an example:

    class Employee < ActiveRecord::Base
    end
    class Manager < Employee
    end
    
    manager = Employee.new.becomes(Manager)
    manager.class             # => M...
5805 [PATCH] assert_recognizes does not support constraints was updated in Ruby on Rails
  • Dim
    • Title changed from assert_recognizes does not support constraints to [PATCH] assert_recognizes does not support constraints
    by Dim at 3:49 PM
Monday, November 08 2010
5805 assert_recognizes does not support constraints was updated in Ruby on Rails
  • Dim
    Dim commented at 2:03 PM

    Ok, this is my final go - I promise!

  • Dim
    Dim commented at 1:37 PM

    Apologies, please ignore the last post. Here's an even better patch (not sure if it's the best way to validate constraints though).

  • Dim
    Dim commented at 1:26 PM

    Here's a working (in this case, failing) patch.

Wednesday, August 25 2010
5457 Arel/AR prepending 'AND' unconditionally after newlines in string literals in... was updated in Ruby on Rails
  • Dim
    Dim commented at 6:52 PM

    Or just go with [clause].flatten (not to duplicate code for just one single Array() instance)