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.

Ben Johnson's latest activity

Tuesday, March 08 2011
6543 Chaining named scopes executes an unnecessary query. was created in Ruby on Rails
  • Ben Johnson
    Ben Johnson created the ticket at 3:47 AM

    I found a rather serious problem with named scopes in ActiveRecord 2.3.X. After analyzing my logs I noticed that chaining named scopes actually executes extra u...

Thursday, May 20 2010
4660 Find in batches when destroying dependent associations was created in Ruby on Rails
  • Ben Johnson
    Ben Johnson created the ticket at 3:01 PM

    This is more of an idea I wanted to toss up, if people like it I'll work on a commit. But find_each and find_in_batches are both in ActiveRecord. Wouldn't it ma...

Thursday, June 25 2009
2658 Internal server error after empty POST with XML content type was updated in Ruby on Rails
Sunday, January 18 2009
1220 Solving conflicted joins and include find options was updated in Ruby on Rails
  • Ben Johnson
    Ben Johnson commented at 6:42 AM

    I understand that, but I failed to specify the main reason this should be included. This can easily happen when chaining named scopes, since each scope can spec...

Wednesday, October 15 2008
1220 Solving conflicted joins and include find options was created in Ruby on Rails
  • Ben Johnson
    Ben Johnson created the ticket at 8:45 PM

    Take this example:

    User.all(:conditions => "orders.total > 100 and line_items.state = 'open'", :joins => {:orders => :line_items}, :include => :orders)
    

    You ge...

Friday, September 12 2008
1038 assert_valid_keys slow? was created in Ruby on Rails
  • Ben Johnson
    Ben Johnson created the ticket at 11:24 PM

    I don't know if this is helpful or not, but I figured I would share it.

    I am writing a library that uses ActiveSupport. I have been using the Hash.assert_valid_...

Tuesday, September 09 2008
1006 Extract prototype related helpers into a plugin was created in Ruby on Rails
  • Ben Johnson
    Ben Johnson created the ticket at 7:43 PM

    This is really a suggestion, maybe I can plant a seed and it will grow into something. I'm sure I'm not the first person to mention this either.

    With jQuery in ...

Thursday, June 05 2008
346 skip_time_zone_conversion_for_attributes does not work was created in Ruby on Rails
  • Ben Johnson
    Ben Johnson created the ticket at 10:12 PM

    If I do the following:

    class A < ActiveRecord::Base

    self.skip_time_zone_conversion_for_attributes = [:field_a]

    end

    class B < ActiveRecord::Base

    self.skip_...