Hi, I have a carts table with columns: campsite, arrival_date, nights,
parents, children, family_claim, total. Here children and family_claim
column allows null so even if the value is not passed for these columns
it should be valid entry. How can I achieve this. At the moment I'm
using this way in the cart_test.rb:

def test_invalid_with_empty_attribute
 cart = Cart.new(:children => "", :family_claim => 1)
 assert !cart.valid?
 assert cart.errors.invalid?(:campsite)
 ..............................
end

So, I just wan't to make sure I'm on the right track. Thanks.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to