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.

Miles Egan's latest activity

Sunday, July 18 2010
3030 Rails does not handle TypeError from Rack on malformed query strings was updated in Ruby on Rails
  • Miles Egan
    Miles Egan commented at 5:11 PM

    Attached is a new patch with a better test.

  • Miles Egan
    Miles Egan commented at 4:35 PM

    All that our normalize_parameters function does is recursively convert the params hash to a hash_with_indifferent_access, so it doesn't seem to me that it reall...

  • Miles Egan
    Miles Egan commented at 3:41 PM

    José here is the chain of events as I see it:

    1. rails tries to handle the request, which triggers the param parsing code in rack
    2. rack fails to parse the query st...
Friday, July 16 2010
3374 text_field() does not use overridden model accessors was updated in Ruby on Rails
  • Miles Egan
    • Importance changed from to Low
    by Miles Egan at 6:38 AM

    This seems to be a result of this definition in lib/action_view/form_helper.rb:

            def value_before_type_cast(object, method_name)
              unless object...
Wednesday, July 14 2010
5098 Rails 3 Beta 4 ActiveRecord 5X slower than Rails 2.3.5 was updated in Ruby on Rails
  • Miles Egan
    Miles Egan commented at 4:57 AM

    Rohit I've attached two traces from ruby-prof on this benchmark, prof2.txt for rails2 and prof3.txt for rails 3. I'm no expert at ruby profiling either but the ...

  • Miles Egan
    Miles Egan commented at 4:23 AM

    John - good catch. I guess I chose a bad default value for my test data that masked the behavior of the where() method. Those low times meant that no queries we...

  • Miles Egan
    Miles Egan commented at 1:15 AM

    Daniel - if you look at the benchmark code I posted I access an attribute(name, in this case) of each instance returned by where() and use it to calculate a run...

Tuesday, July 13 2010
5094 ActiveRelation doesn't quote columns that are SQL keywords was updated in Ruby on Rails
5098 Rails 3 Beta 4 ActiveRecord 5X slower than Rails 2.3.5 was updated in Ruby on Rails
  • Miles Egan
    Miles Egan commented at 10:10 PM

    Following up on this, I created a test set of data like this:

    >> 5000.times { User.create(:name => "name") }
    

    And a simple benchmark script like this:

    count =...
  • Miles Egan
    Miles Egan commented at 9:37 PM

    drjoke - I think the number we're interested in here is the last (real time) of the benchmark measure results, right?