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.

Philip Hallstrom's latest activity

Wednesday, August 27 2008
843 validates_length_of, :is does not work for numbers was updated in Ruby on Rails
  • Philip Hallstrom
    Philip Hallstrom commented at 4:27 PM

    The problem with :greater_than or inclusion is that it doesn't work for zip codes (which I think is what the original post linked to as a problem).

    If you're s...

Tuesday, August 19 2008
765 primary_key option for belongs_to was updated in Ruby on Rails
  • Philip Hallstrom
    Philip Hallstrom commented at 6:38 AM

    Updated patch to fix association build/create.

  • Philip Hallstrom
    Philip Hallstrom commented at 5:57 AM

    This patch doesn't cover creation (State.cities.build(...)) correctly.

Monday, August 18 2008
765 primary_key option for belongs_to was updated in Ruby on Rails
  • Philip Hallstrom
    Philip Hallstrom commented at 9:52 PM

    Same patch with tests in format correct git/rails format for submission.

583 SQL queries with WHERE IN are incorrectly generated for named scopes was updated in Ruby on Rails
Saturday, August 16 2008
843 validates_length_of, :is does not work for numbers was updated in Ruby on Rails
  • Philip Hallstrom
    Philip Hallstrom commented at 4:59 AM

    Looks like you could fix this by patching lines 539 and 556 of activerecord/lib/active_record/validations.rb to convert 'value' to a String if it's any of the v...

Friday, August 15 2008
583 PATCH: SQL queries with WHERE IN are incorrectly generated for named scopes was updated in Ruby on Rails
  • Philip Hallstrom
    • Title changed from SQL queries with WHERE IN are incorrectly generated for named scopes to PATCH: SQL queries with WHERE IN are incorrectly generated for named scopes
    • Tag changed from 2.1, activerecord, bug, named_scope to 2.1, activerecord, bug, named_scope, patch
    by Philip Hallstrom at 6:54 AM

    Below is a patch that fixes this. It has a slight drawback in that in cases where the named scope only returns one value it will generate "WHERE id IN (123)" w...

765 PATCH: primary_key option for belongs_to was updated in Ruby on Rails
  • Philip Hallstrom
    • Title changed from :primary_key option for belongs_to to PATCH: primary_key option for belongs_to
    • Tag changed from patch to activerecord, belongs_to, patch, tests
    by Philip Hallstrom at 6:21 AM
Tuesday, August 12 2008
765 :primary_key option for belongs_to was updated in Ruby on Rails
  • Philip Hallstrom
    Philip Hallstrom commented at 7:26 PM

    I dug into the unit tests and believe I've added a correct unit test to test this functionality.

    
    $ rake test_sqlite3 TEST=test/cases/associations/belongs_to_a...
  • Philip Hallstrom
    • Tag set to patch
    by Philip Hallstrom at 7:12 PM

    I've written up a patch that seems to work. I may not be thinking it all the way through, but maybe it will get things closer to where they need to be. I've d...