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