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.

Norman Clarke's latest activity

Thursday, April 08 2010
3989 [Rails 3] Multibyte char in controller was updated in Ruby on Rails
  • Norman Clarke
    Norman Clarke commented at 3:57 AM

    You probably need to add an encoding comment to the top of the file. For example:

    # encoding: utf-8
    
Monday, April 20 2009
1274 Add support for :order => :random in queries was updated in Ruby on Rails
  • Norman Clarke
    Norman Clarke commented at 6:19 PM

    Max, I think most people working with Rails would rather install a plugin than mess around with PG's stored procedure languages or program SQLite extensions in ...

Monday, March 09 2009
1274 Add support for :order => :random in queries was updated in Ruby on Rails
  • Norman Clarke
    Norman Clarke commented at 9:22 PM

    I'm really surprised you would reject something because "with large datasets and no optimization it could create slow queries." I mean, isn't that true for a lo...

  • Norman Clarke
    Norman Clarke commented at 8:45 PM

    Koz, that's not true when you select only indexed columns:

    
    mysql> explain select id from hits order by rand()\G
    *************************** 1. row *********...
  • Norman Clarke
    Norman Clarke commented at 7:14 PM

    Limiting that to selecting only an indexed column would cut down your query time significantly. On my system, I get these times querying against a table with lo...

  • Norman Clarke
    Norman Clarke commented at 6:24 PM

    "Performance" is probably the single worst reason to reject this patch; if you have a table with a million users, what's the "higher performance" way of pulling...

Friday, February 27 2009
1274 [PATCH] add support for :order => :random in queries was updated in Ruby on Rails
  • Norman Clarke
    Norman Clarke commented at 5:12 PM

    Attaching new patch against latest master, with documentation.

  • Norman Clarke
    Norman Clarke commented at 2:34 PM

    OK, I'll submit an updated patch later today.

Monday, January 19 2009
1275 Add content_exists? to ActionView::Helpers::CaptureHelper was updated in Ruby on Rails
  • Norman Clarke
    Norman Clarke commented at 9:57 PM

    Oops, sorry for the lack of patchiness.

    The problem is, I'm unaware of any other way to check if a named content block has been set in a content_for block other...

Sunday, October 26 2008
1275 [PATCH] add content_exists? to ActionView::Helpers::CaptureHelper was created in Ruby on Rails
  • Norman Clarke
    Norman Clarke created the ticket at 9:54 PM

    This patch adds a content_exists? method to ActionView::Helpers::CaptureHelper. This can be useful for conditionally handling content set using content_for bloc...