Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

all specs pass now

  • Loading branch information...
commit 0cee4170f65559b0f6072dfdf4f0b765a9e171b5 1 parent d73acb6
@asanghi authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/enumlogic.rb
  2. +1 −1  spec/enumlogic_spec.rb
View
2  lib/enumlogic.rb
@@ -60,7 +60,7 @@ def enum(field, values, options = {})
end
end
- validates field, :inclusion => {:in => values_array}, :allow_blank => options[:allow_blank]
+ validates field, :inclusion => {:in => values_array}, :allow_blank => options[:allow_blank], :if => options[:if]
end
def enum?(name)
View
2  spec/enumlogic_spec.rb
@@ -77,7 +77,7 @@
end
it "should allow nil during validations" do
- Computer.enum :kind, ["apple", "dell", "hp"], :allow_nil => true
+ Computer.enum :kind, ["apple", "dell", "hp"], :allow_blank => true
c = Computer.new
c.should be_valid
end
Please sign in to comment.
Something went wrong with that request. Please try again.