created scaffold for LineItem (belongs_to :product,:cart) and Cart (has_many :line_items)
added before_destroy hook to Product to check if the product is referenced by some LineItem
created concern with private method set_cart which I can include into any controller
set_cart stores and finds cart instance in session
LineItemsController#create finds cart, finds product by id from params, creates line_item
  with found product and adds the item to the cart, then redirects to cart
added button to store/index view to add product to cart, linking to LineItem#create
carts/show view shows list of product titles in the cart
added quantity to LineItem model with default 1
added add_product to Cart model which looks if there is already an item with that product_id
  and if so, increases the quantity
LineItemsController uses @cart.add_product to create the new item
carts/show view shows the product quantities
added migration that combines each cart's line items for each product to one with summed quantity
disabled errors when there are pending migrations in the development environment
added error handling for invalid cart id
removed :cart_id from params accepted by LineItemsController methods