From 91afd49f750daa3f7aec9a52917d774636b3c157 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 20 Mar 2013 17:20:17 +0800 Subject: [PATCH] Fix for scope --- lib/orbit_core_lib.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/orbit_core_lib.rb b/lib/orbit_core_lib.rb index 9820615b..d0b0dc78 100644 --- a/lib/orbit_core_lib.rb +++ b/lib/orbit_core_lib.rb @@ -46,7 +46,7 @@ module OrbitCoreLib def self.included(base) base.instance_eval("field :disable,type: Boolean,:default => false") - base.instance_eval("scope :all,where(disable: false)") + base.instance_eval("scope :all, where(:disable.in [false, nil, ''])") base.instance_eval("scope :admin_manager_all,find(:all)") base.define_singleton_method :find do |*args|