fix some queries for mysql4 where NOT is interpreted more strict than in mysql5. Thanks Steven for finding this one out!

This commit is contained in:
Reinier Balt 2009-02-08 20:38:27 +01:00
parent 949c746215
commit 324838c1c4
2 changed files with 4 additions and 4 deletions

View file

@ -6,8 +6,8 @@ class Todo < ActiveRecord::Base
belongs_to :recurring_todo
named_scope :active, :conditions => { :state => 'active' }
named_scope :not_completed, :conditions => ['NOT state = ? ', 'completed']
named_scope :are_due, :conditions => ['NOT todos.due IS NULL']
named_scope :not_completed, :conditions => ['NOT (state = ? )', 'completed']
named_scope :are_due, :conditions => ['NOT (todos.due IS NULL)']
STARRED_TAG_NAME = "starred"