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.

Adam Meehan's latest activity

Saturday, September 11 2010
5254 Rails 3RC's ActiveModel#as_json outputs array of message instead of hash of c... was updated in Ruby on Rails
  • Adam Meehan
    Adam Meehan commented at 8:31 AM

    This issue needs a little more thought. For example if we have multiple errors for an attribute we get a JSON hash with duplicate keys of the attribute name.

Friday, September 10 2010
5494 Uniqueness validator can cause error with after_initialize callback was updated in Ruby on Rails
  • Adam Meehan
    Adam Meehan commented at 11:15 PM

    Whoops, thanks for the heads up on the patch. Fixed now.

    A change to exists? caused too many errors to fix now. Will revisit.

  • Adam Meehan
    • Tag changed from activerecord, patch, validates_uniqueness_of, validations to activerecord, patch, performance, validates_uniqueness_of, validations
    by Adam Meehan at 4:54 AM
5221 Remove ineffectual line from numericality validator was updated in Ruby on Rails
  • Adam Meehan
    Adam Meehan commented at 4:51 AM

    Performance will not be better with the lines left in. It's a completely unnecessary check.

    If you look into the validate method you will see that a validator w...

Monday, August 30 2010
5494 Uniqueness validator can cause error with after_initialize callback was created in Ruby on Rails
  • Adam Meehan
    Adam Meehan created the ticket at 4:59 AM

    The uniqueness validator uses the exists? method as the test for a duplicate record. The exists? method calls the find_by_sql method which will instantiate any ...

Wednesday, August 04 2010
5221 Remove ineffectual line from numericality validator was updated in Ruby on Rails
  • Adam Meehan
    Adam Meehan commented at 5:40 AM

    I disagree on the second point. The validates_each method is never called if the raw_value is nil and option :allow_nil is true.

    The allow_nil and allow_blank c...

Tuesday, August 03 2010
5221 Remove ineffectual line from numericality validator was updated in Ruby on Rails
  • Adam Meehan
    • Tag changed from patch validation numericality to patch, tiny, validations
    by Adam Meehan at 10:44 AM
Wednesday, July 28 2010
5221 Remove ineffectual line from numericality validator was created in Ruby on Rails
  • Adam Meehan
    Adam Meehan created the ticket at 12:46 AM

    Removes a line in the numericality validator's validate_each method pertaining to the allow_nil option. The line checks the raw_value for nil against the allow_...

Monday, May 05 2008
107 Level hooks for validations was updated in Ruby on Rails
  • Adam Meehan
    Adam Meehan commented at 8:26 AM

    Your right it does sound more natural. Perhaps just leave the level singular and when a plural symbol is passed to the errors method as per Josh's suggestion t...

  • Adam Meehan
    Adam Meehan commented at 2:19 AM

    Actually a cleaner solution than my first is to just add

    :level => :errors

    in the default configuration hash for each validation method. No need for an extra...