Skip to content

Commit

Permalink
Fixing the syntax error, using a lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
willrjmarshall committed Feb 22, 2012
1 parent 603caa5 commit 2b52308
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/enumerate_it.rb
Expand Up @@ -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
Expand Down

0 comments on commit 2b52308

Please sign in to comment.