Class: Locomotive::Ecommerce::CartController

Inherits:
ApplicationController show all
Defined in:
app/controllers/locomotive/ecommerce/cart_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#authenticate_user!, #locomotive_user?

Methods included from EcommerceHelper

#as_currency, #current_user

Methods included from InventoryInterface

included

Methods included from EcommerceUrlHelper

#add_to_cart_path, #cart_path, #cart_update_path, #checkout_index_path, #checkout_path, #checkout_update_path, #confirm_order_path, #post_checkout_path, #purchases_path, #remove_from_cart_path

Methods included from EcommerceCartHelper

#current_user_cart

Instance Method Details

#updateObject



4
5
6
7
8
9
# File 'app/controllers/locomotive/ecommerce/cart_controller.rb', line 4

def update
  @cart = Cart.find(params[:id])
  @cart.update_from_params(params)
  flash[:success] = 'Updated cart'
  redirect_to cart_path
end