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.

Mat Schaffer's latest activity

Sunday, December 19 2010
6133 Empty array interpolates as NULL in where condition was updated in Ruby on Rails
  • Mat Schaffer
    Mat Schaffer commented at 8:38 PM

    Originally I was expecting NOT IN () which at least under sqlite had the intended effect of giving me all records. But I'm pretty sure postgres didn't like that...

Wednesday, December 08 2010
6133 Empty array interpolates as NULL in where condition was updated in Ruby on Rails
  • Mat Schaffer
    Mat Schaffer commented at 4:35 PM

    Looks like both sqlite and PostgreSQL adapters (tested via heroku's console) both generate the NULL. PostgreSQL seems unhappy with the empty array though since ...

  • Mat Schaffer
    Mat Schaffer commented at 4:17 PM

    Update: Used [''] as a workaround on sqlite. This doesn't seem to work on PostgreSQL.

  • Mat Schaffer
    Mat Schaffer created the ticket at 4:12 PM

    This works fine:

    Comment.where("id NOT IN (?)", [1,2,3])
    

    But passed an empty array like so:

    Comment.where("id NOT IN (?)", [])
    

    Generates this query which do...

Monday, July 19 2010
5154 fixture_path processing assumes a trailing slash ('/') on path was created in Ruby on Rails
  • Mat Schaffer
    Mat Schaffer created the ticket at 8:14 PM

    On MRI this isn't an issue, but on Rubinius, Dir.glob doesn't include extraneous slashes in the file path which causes the fixture -> table mapping to break.

    Fi...

Wednesday, May 26 2010
3945 helper :all on by default was updated in Ruby on Rails
  • Mat Schaffer
    Mat Schaffer commented at 10:22 PM

    Sure would. I put it on my list of things to try to fix. But in the meantime:

    @yehuda: is there some reason for this behavior? Performance maybe?

  • Mat Schaffer
    Mat Schaffer commented at 9:51 PM

    Bump. Just ran into this today.

    Mixing in all helpers into every renderer pretty much defeats the purpose of having per-controller helpers. With the current beh...

Friday, May 07 2010
4437 [Patch] XML Mini Parser NoMethodError :getc when application running through ... was updated in Ruby on Rails
  • Mat Schaffer
    Mat Schaffer commented at 3:34 AM

    That rackinput.diff patch seems to do the trick for my app. Good find, Lawrence!

    I also did a test app without any middleware and was able to produce this under...

  • Mat Schaffer
    Mat Schaffer commented at 2:43 AM

    Thanks for the clarification, Lawrence. If it helps, the app in question is using Rack::URLMap in config.ru (for switching between the main app and Resque::Serv...

Thursday, May 06 2010
4437 [Patch] XML Mini Parser NoMethodError :getc when application running through ... was updated in Ruby on Rails
  • Mat Schaffer
    Mat Schaffer commented at 2:40 PM

    Just thought I'd mention that we've hit this running in production mode as well. Thanks for your work on this, looking forward to a fix.