From 2b52308949d73c13a33956f280e4c8858cef67d4 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Wed, 22 Feb 2012 11:38:23 +1100 Subject: [PATCH] Fixing the syntax error, using a lambda --- lib/enumerate_it.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/enumerate_it.rb b/lib/enumerate_it.rb index ef73be4..ce74632 100644 --- a/lib/enumerate_it.rb +++ b/lib/enumerate_it.rb @@ -319,7 +319,7 @@ def create_helper_methods(klass, attribute_name) def create_scopes(klass, attribute_name) klass.enumeration.keys.each do |option| if respond_to? :scope - scope option, where(attribute_name => klass.enumeration[option].first) + scope option, lambda { where(attribute_name => klass.enumeration[option].first)} end end end