search for: on001

Displaying 1 result from an estimated 1 matches for "on001".

Did you mean: rn001
2006 May 26
4
Using ''validates_inclusion_of'' to validate foreign key
...est::Unit::TestCase fixtures :orders, :order_items def test_validates_inclusion_of_order_id_in_orders orderitem = OrderItem.new(:order_id => 1) assert( orderitem.save, orderitem.errors.full_messages.join(''\n'')) end end The fixture: first: id: 1 sid: ''ON001'' All of the code can be found at http://metaspot.net/dev/browser/?rev=46 -- Posted via http://www.ruby-forum.com/.