rails g scaffold Order name address:text email pay_type
rails g migration add_order_to_line_item order:references
rake db:migtate
add a “Checkout” button in partial _cart.html.erb
have access to the cart when we create an order
make sure that there’s something in the cart when we create an order
add test “require item in cart” in order controller test
update the test “should get new” in orders controller test
fix the type errors in partial _cart.html.erb
update the view of new orders page
add a constant array PAYMENT_TYPES in order model
update the the form_for size and update the pay_type to select helper of orders page
add .depot_form stylesheets in application.css.scss
add validates for Order model
modify test fixture after modified validation rules
modify the line items test fixture for a line item needs to be in the cart after an order to be created
line_item belongs_to order
order has_many line_items
update the create method in order controller
add method add_line_items_from_cart in order model