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.

Josh Susser's latest activity

Saturday, March 06 2010
4120 rake db:migrate skips migrations with older version numbers than current was created in Ruby on Rails
  • Josh Susser
    Josh Susser created the ticket at 11:43 PM

    Not sure if this is considered a bug, but the behavior is surprising enough that I think it's worth changing. When using timestamped migration version numbers, ...

Friday, December 11 2009
3558 Actionpack 2.3.5 gemspec and Rack requirement don't match was updated in Ruby on Rails
Monday, November 30 2009
3494 [PATCH] Autolinking non-http protocols doesn't work was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 6:07 AM

    +1 works for me. Can we get this on 2-3-stable soon?

Saturday, August 08 2009
2425 [PATCH] Add methods on active record to denote whether any associated objects... was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 7:27 PM

    I think post.comments.any? is a more consistent API. IMO it's better to keep the number of generated methods on the base class to a minimum, and layer this kind...

Wednesday, May 06 2009
2189 count breaks has_many through association collection with named scope was updated in Ruby on Rails
Tuesday, March 03 2009
2090 has_many :through Doesn't Use Conditions For Creating New Records was updated in Ruby on Rails
  • Josh Susser
    • Tag changed from activerecord, has_many_through to activerecord, has_many_through, patch
    by Josh Susser at 3:59 AM

    While it's possible to create sets of conditions where this will work, you can also easily create ones where they don't. Just try an inequality test and you'll ...

Thursday, January 29 2009
1815 [PATCH] Add or_if_blank to Object was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 7:40 AM

    I was going to suggest the block as an option. It's easy to do:

    def or_if_blank(other=nil) self.blank? ? (other || yield) : self end

    Then you can call it with e...

Saturday, January 17 2009
1774 refactor #try to use inheritance was updated in Ruby on Rails
  • Josh Susser
    Josh Susser commented at 2:57 AM

    I mainly copied the rdoc from the old implementation but oh well. Fixed it up. Don't know enough about rdoc to fool it, so I added a doc-only method def that ge...

  • Josh Susser
    Josh Susser created the ticket at 1:32 AM

    I'm not a fan of Object#try, but if it's going to be in the code base, the implementation should at least be optimal. This patch collapses two method calls and ...

Friday, January 02 2009
1686 cleanup and speedup of validates_associated was created in Ruby on Rails
  • Josh Susser
    Josh Susser created the ticket at 5:41 AM

    This is a tiny patch to improve the readability and performance of #validates_associated in ActiveRecord. The obscure use of #inject is replaces by #collect and...