From 3006f73cb742cbcfc2cc5a2c76e61a72b6d97fa2 Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Sun, 21 Sep 2008 09:30:25 -0700 Subject: [PATCH] Bugfix: active_contexts wasn't actually working. --- app/models/user.rb | 2 +- spec/models/user_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index b49db26c..776a9579 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -59,7 +59,7 @@ class User < ActiveRecord::Base has_many :active_contexts, :class_name => 'Context', :order => 'position ASC', - :conditions => [ 'hide = ?', 'true' ] + :conditions => [ 'hide = ?', false ] has_many :todos, :order => 'todos.completed_at DESC, todos.created_at DESC', :dependent => :delete_all diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 7f915fbd..4fb3455d 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -37,7 +37,7 @@ describe User do it 'has many active contexts' do User.should have_many(:active_contexts). with_order('position ASC'). - with_conditions('hide = ?', 'true'). + with_conditions('hide = ?', false). with_class_name('Context') end