From 139f776b36d0ee5fe996b355331f5e6ef7ddba67 Mon Sep 17 00:00:00 2001 From: ymatsumoto Date: Sat, 4 May 2013 02:56:34 +0900 Subject: [PATCH] =?utf8?q?=E9=A1=A7=E5=AE=A2=E6=83=85=E5=A0=B1=E3=80=81?= =?utf8?q?=E7=99=BA=E9=80=81=E6=83=85=E5=A0=B1=E3=80=81=E5=95=86=E5=93=81?= =?utf8?q?=E6=83=85=E5=A0=B1=E3=81=AECSV=E3=82=A2=E3=83=83=E3=83=97?= =?utf8?q?=E3=83=AD=E3=83=BC=E3=83=89=E3=82=92=E3=81=A7=E3=81=8D=E3=82=8B?= =?utf8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/models/customer.rb | 2 +- app/models/order_delivery.rb | 2 +- app/models/product.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/customer.rb b/app/models/customer.rb index 9336d68..19a4a93 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -416,7 +416,7 @@ class Customer < ActiveRecord::Base def add_by_csv(file) line = 0 Customer.transaction do - CSV::Reader.parse(file) do |row| + CSV.parse(file) do |row| if line != 0 customer = new_by_array(row) unless customer.save! diff --git a/app/models/order_delivery.rb b/app/models/order_delivery.rb index 72fff90..9e1b6e9 100644 --- a/app/models/order_delivery.rb +++ b/app/models/order_delivery.rb @@ -257,7 +257,7 @@ class OrderDelivery < ActiveRecord::Base line = 0 update_line = 0 OrderDelivery.transaction do - CSV::Reader.parse(file) do |row| + CSV.parse(file) do |row| if line != 0 record = OrderDelivery.find_by_order_id(row[0].to_i) return [line-1, update_line, false] if record.order.retailer_id != retailer_id diff --git a/app/models/product.rb b/app/models/product.rb index f12d738..86b2b9f 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -340,7 +340,7 @@ class Product < ActiveRecord::Base def add_by_csv(file, retailer_id) line = 0 Product.transaction do - CSV::Reader.parse(file) do |row| + CSV.parse(file) do |row| if line != 0 product = new_by_array(row, retailer_id) if product.nil? -- 2.11.0