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.

ambition should use 'is' for NULL instead of ==

#94

This statement:

LanguageElement.select{|e| e.parent_id == nil}

produces this:

SELECT * FROM language_elements WHERE (language_elements.`parent_id` = NULL)

but should produce this:

SELECT * FROM language_elements WHERE (language_elements.`parent_id` is NULL)

The attached patch makes it so.

Cheers,

David

Reported by David Chelimsky · August 30th, 2007 @ 06:22 AM

State: resolved
Milestone: none
Assigned to: Chris Wanstrath Chris Wanstrath

Activity

  1. David Chelimsky
  2. Chris Wanstrath
    Chris Wanstrath
    • State changed from new to resolved

    Thanks!

    http://projects.require.errthebl...

    Pushed with 0.1.4 gem.

    August 30th, 2007 @ 11:30 AM

  3. David Chelimsky
    David Chelimsky

    You're welcome. Just happens that the first thing I tried it on needed that :)

    This is a really great idea Chris. In addition to making finders feel more like Ruby, it also 'feels' like (I could be dreaming here) it can go a long way to better decouple Rails' component layers. That's just an instinct. Maybe I'm crazy.

    Anyhow, thanks for sharing this with the world, and thanks for accepting my patch :)

    Cheers,

    David

    August 31st, 2007 @ 07:49 AM

  4. Chris Wanstrath
    Chris Wanstrath
    • State changed from resolved to open

    Hey, thanks for the patch.

    I'm reopening this bug as a 'note to self' because I need to add IS NOT NULL.

    August 31st, 2007 @ 12:41 PM

  5. Chris Wanstrath
    Chris Wanstrath
    • State changed from open to resolved

    Okay, fixed that up in http://projects.require.errthebl...

    September 1st, 2007 @ 03:26 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.