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.

Tanel Suurhans's latest activity

Wednesday, November 24 2010
1812 default_scope can't take procs was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 8:37 PM

    It seems that with Tim Morgans patch the proc for the default scope is not evaluated properly. In production mode the value inside the proc (Time.now for exampl...

Friday, September 24 2010
1812 default_scope can't take procs was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 8:35 AM

    The issue is that default scopes should be stored as procs and evaluated on the last moment. Evaluating the proc when appending the scope will not work as expec...

Sunday, September 12 2010
4267 Rails3 (with Ruby 1.9.1) problem when sorting a list was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 11:18 AM

    Could not reproduce this issue on 1.9.2-p0 or 1.8.7 with the same piece of html and javascript (latest jQuery and jQuery UI).
    With both Rails versions the param...

Thursday, May 06 2010
4539 link_to route with method was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 7:57 AM

    You do realize that when using a route product_path(@product), it now depends on the HTTP method supplied what method will be invoked? Like PUT on that path wil...

Wednesday, May 05 2010
2137 Allow find_in_batches to use :order, :limit, and :offset was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 10:44 PM

    Had to rework the functionality a bit, ported test provided in the previous patch and added some new ones. Also made a new example in the doc comments for usage...

Friday, April 30 2010
4511 ActionView::PathSet .exists? fails due to nil array was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 10:39 PM

    Probably needs a bit more information to write a failing test-case. The fix in itself looks easy enough.

4457 find_or_create_by_foo when foo is protected attribute was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 10:04 PM

    Tested this on 2-3-stable.

    author = Author.find_or_create_by_name(:name => "bm", :author_address_id => 1)
    author.inspect # => #<Author id: 10, :name => "bm", :...
974 attribute_type is not set to null if :dependent => :nullify is specified for ... was updated in Ruby on Rails
  • Tanel Suurhans
    Tanel Suurhans commented at 4:17 PM

    Attached proposed fix for the original problem described in the ticket. Managed to solve the issue with relation_type field not set to nil.

    Previous code didn't...

  • Tanel Suurhans
    Tanel Suurhans commented at 2:17 PM

    Also attached a patch to fix the :nullify behavior on destruction for 2-3-stable branch with tests.

  • Tanel Suurhans
    Tanel Suurhans commented at 2:08 PM

    In my opinion this is the expected behavior, as :dependent => :nullify should only null the thingy when person is destroyed.
    The bug itself seems to exist on de...