Make the order form work, and include a test.
Rename 'type' column to 'ordertype' to avoid confusing rails.