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.

Corey Ward's latest activity

Saturday, March 26 2011
6127 after_initialize may lead to missing attribute when used with uniqueness vali... was updated in Ruby on Rails
  • Corey Ward
    Corey Ward commented at 4:05 AM

    Until this is fixed properly, I'm using the following pattern to work around the issue:

    after_initialize :set_defaults
    
    def set_defaults
      self.foo ||= 'bar' u...
  • Corey Ward
    Corey Ward commented at 3:52 AM

    Ditto on what John Berry said. Rails 3.0.5.

Thursday, March 24 2011
6609 update_attribute is annoying, what about a bang method? was updated in Ruby on Rails
  • Corey Ward
    Corey Ward commented at 5:39 PM

    -1

    Dropping = is actually counter-intuitive and not very Ruby-like. It's even less Rails-like.

    It's pretty easy to use:

    @foo.bar = 'baz' and @foo.save
    

    Or if y...

6611 ActiveRecord query changing when a dot/period is in condition value was created in Ruby on Rails