Sha256: ebf1d292a9813547f23c15e056ef5bb2ced31b6265ca15ee93ac6606bd023b6a
Contents?: true
Size: 580 Bytes
Versions: 12
Compression:
Stored size: 580 Bytes
Contents
class Muck::CartItemsController < ApplicationController unloadable include MuckCommerce::CartMethods def create @cart_item = CartItem.new @cart_item.product = Product.find(params[:product_id]) @cart_item.cart = get_cart(current_user) @cart_item.quantity = 1 @cart_item.save! respond_to do |format| format.html { redirect_to new_order_path } end rescue => ex respond_to do |format| flash[:notice] = translate('muck.commerce.add_cart_item_error', :error => ex) format.html { redirect_to cart_path } end end end
Version data entries
12 entries across 12 versions & 1 rubygems