Shopping cart written in rails/javascript