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.

iain's latest activity

Saturday, March 19 2011
6598 ActiveRecord::Relation#except and #only loses scope extensions was created in Ruby on Rails
  • iain
    iain created the ticket at 9:35 PM

    Given a scope with extensions
    When I use the except to remove a part from the relation
    Then the extensions are gone, because except returns a brand new relation...

Wednesday, December 08 2010
6077 ActiveSupport::JSON.encode fails for Struct types was updated in Ruby on Rails
  • iain
    iain commented at 9:33 PM

    json_test.rb is the code I showed (minus a "require 'config/environment'" line to load my Rails app).
    To fix it, we need to dig in activesupport/lib/active_supp...

  • iain
    iain commented at 8:42 PM

    BTW: this issue was introduced in Rails 3.0.2, the above code works fine in Rails 3.0.1

  • iain
    • Tag changed from json to_json encode struct to as_json, encode_json, json, to_json
    by iain at 8:37 PM

    +1

    It's not really a problem with Structs, but with classes included in native structures.

    A test case:

    class Sub
      def as_json(*)
        { :foo => "bar" }
      end
    ...
Friday, July 30 2010
5242 ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone away was updated in Ruby on Rails
  • iain
    iain commented at 9:23 AM

    Not be freaking anybody out, but I'm having this problem since I upgraded Rails 3.0.0.beta4 to 3.0.0.rc. It never happened before I upgraded, and now it happene...

Monday, July 26 2010
4183 Possible memory leak in Rails 3 was updated in Ruby on Rails
  • iain
    iain commented at 11:06 PM

    Confirming that it has been fixed rc1: I tested a medium sized Rails 3.0.0.beta4 app with 'ab':

    0 requests: 94.2MB
    50 requests: 268.0MB
    100 requests: 320.8MB
    20...

Monday, April 19 2010
4439 [PATCH] ActiveModel::Errors minor bugfix and fully tested its API was created in Ruby on Rails
  • iain
    iain created the ticket at 3:17 PM

    I found an issue with I18n and adding errors to base which I fixed. It tried to call the base method on the record, as the I18n-part thought it was a normal att...

Saturday, April 17 2010
4429 Templates that use with_options... was updated in Ruby on Rails
  • iain
    iain commented at 10:13 PM

    @David: That's not an error. In Rails 3 you should do this. That works even in HAML.

Thursday, July 09 2009
2889 Rename _delete to _destroy in nested attributes was updated in Ruby on Rails
  • iain
    iain commented at 10:25 AM

    +1 the difference between destroy and delete is quite confusing, let's minimize the confusion

Saturday, June 13 2009
2800 [PATCH] Bytes calculation speed up for ActiveSupport was updated in Ruby on Rails
  • iain
    iain commented at 4:56 PM

    +1, a bit of a no brainer actually