Skip to content
Browse files

all specs pass now

  • Loading branch information...
1 parent d73acb6 commit 0cee4170f65559b0f6072dfdf4f0b765a9e171b5 Aditya Sanghi committed Sep 26, 2010
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

0 comments on commit 0cee417

Please sign in to comment.
Something went wrong with that request. Please try again.