OSDN Git Service

ポイントを選択しない場合にエラーになる問題を対応
authorTaro Matsuzawa <tmatsuzawa@kbmj.com>
Tue, 19 Oct 2010 06:04:47 +0000 (15:04 +0900)
committerTaro Matsuzawa <tmatsuzawa@kbmj.com>
Tue, 19 Oct 2010 06:04:47 +0000 (15:04 +0900)
app/controllers/cart_controller.rb

index 2692f17..a43a680 100644 (file)
@@ -327,7 +327,7 @@ class CartController < BaseController
     if @login_customer
       @all_use_point = 0
       @order_deliveries.each do |retailer_id, od|
-        if params[:points][retailer_id][:point_check] == "true"
+        if !params[:points].nil? && !params[:points][retailer_id].nil? && params[:points][retailer_id][:point_check] == "true"
           use_point = od.use_point.to_i
           if use_point <= 0
             flash.now[:error] = '使用ポイントをご入力ください。'