Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing the syntax error, using a lambda

  • Loading branch information...
commit 2b52308949d73c13a33956f280e4c8858cef67d4 1 parent 603caa5
@willrjmarshall willrjmarshall authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/enumerate_it.rb
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.