質問編集履歴
1
エラーコード追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -120,4 +120,38 @@
|
|
120
120
|
このようにしています。
|
121
121
|
自分なりに調べてみたらCustomerテーブルにはcustomerカラムはありません。というようなエラーのようでしたが、もともとcustomerカラムははじめから作っておりません。
|
122
122
|
|
123
|
-
どなたか解決方法を教えていただけないでしょうか?宜しくお願いします。
|
123
|
+
どなたか解決方法を教えていただけないでしょうか?宜しくお願いします。
|
124
|
+
|
125
|
+
追記
|
126
|
+
指摘していただいた所を修正したところ
|
127
|
+
Unpermitted parameter: :phones
|
128
|
+
Unpermitted parameters: :email, :family_name, :given_name, :family_name_kana, :given_name_kana
|
129
|
+
となりupdateできませんでした。表示されたのは以下になります。
|
130
|
+
```ここに言語を入力
|
131
|
+
Started PATCH "/customers/1" for 10.0.2.2 at 2018-09-07 09:38:31 +0900
|
132
|
+
Processing by Customer::CustomersController#update as HTML
|
133
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"TuF5A8ETAD98R1Qlvesf4ZiH+RsHWBLCcwLVOfuOKF7AwsQKO11fmSVbJCiaxmUmN3QLNqMdMdqbuE7Trmk5Zg==", "form"=>{"customer"=>{"email"=>"sato.ichiro@example.jp", "family_name"=>"佐藤あ", "given_name"=>"一郎", "family_name_kana"=>"サトウ", "given_name_kana"=>"イチロウ", "phones"=>{"0"=>{"number"=>"0184-36-2632", "primary"=>"0"}, "1"=>{"number"=>"070-1145-6699", "primary"=>"0"}}}, "inputs_home_address"=>"1", "home_address"=>{"postal_code"=>"9204279", "prefecture"=>"長崎県", "city"=>"[\"赤巻市\"]", "address1"=>"開発1-2-3", "address2"=>"レイルズハイツ301号室"}}, "commit"=>"更新", "host"=>"fujiyoshi.nouen.com", "id"=>"1"}
|
134
|
+
Customer Load (0.5ms) SELECT `customers`.* FROM `customers` WHERE `customers`.`id` = 1 LIMIT 1
|
135
|
+
Customer Load (0.4ms) SELECT `customers`.* FROM `customers` WHERE `customers`.`id` = 1 LIMIT 1
|
136
|
+
(0.5ms) SELECT COUNT(*) FROM `phones` WHERE `phones`.`customer_id` = 1 AND `phones`.`address_id` IS NULL
|
137
|
+
HomeAddress Load (0.5ms) SELECT `addresses`.* FROM `addresses` WHERE `addresses`.`type` IN ('HomeAddress') AND `addresses`.`customer_id` = 1 LIMIT 1
|
138
|
+
Unpermitted parameter: :phones
|
139
|
+
Unpermitted parameters: :email, :family_name, :given_name, :family_name_kana, :given_name_kana
|
140
|
+
(0.2ms) BEGIN
|
141
|
+
Customer Exists (0.5ms) SELECT 1 AS one FROM `customers` WHERE `customers`.`email_for_index` = BINARY 'sato.ichiro@example.jp' AND (`customers`.`id` != 1) LIMIT 1
|
142
|
+
CACHE Customer Load (0.0ms) SELECT `customers`.* FROM `customers` WHERE `customers`.`id` = 1 LIMIT 1 [["id", 1], ["LIMIT", 1]]
|
143
|
+
CACHE Customer Load (0.0ms) SELECT `customers`.* FROM `customers` WHERE `customers`.`id` = 1 LIMIT 1 [["id", 1], ["LIMIT", 1]]
|
144
|
+
CACHE Customer Load (0.0ms) SELECT `customers`.* FROM `customers` WHERE `customers`.`id` = 1 LIMIT 1 [["id", 1], ["LIMIT", 1]]
|
145
|
+
(0.3ms) ROLLBACK
|
146
|
+
Rendering customer/customers/edit.html.erb within layouts/customer
|
147
|
+
Rendered customer/customers/_phone_fields.html.erb (2.7ms)
|
148
|
+
Rendered customer/customers/_phone_fields.html.erb (2.1ms)
|
149
|
+
Rendered customer/customers/_customer_fields.html.erb (127.0ms)
|
150
|
+
Rendered customer/customers/_home_address_fields.html.erb (22.5ms)
|
151
|
+
Rendered customer/customers/_form.html.erb (156.8ms)
|
152
|
+
Rendered customer/customers/edit.html.erb within layouts/customer (161.1ms)
|
153
|
+
Rendered customer/shared/_header.html.erb (2.8ms)
|
154
|
+
Rendered shared/_footer.html.erb (0.7ms)
|
155
|
+
Completed 200 OK in 1274ms (Views: 1159.2ms | ActiveRecord: 3.0ms)
|
156
|
+
```
|
157
|
+
全くのお手上げですので再度ご指摘いただけないでしょうか?お願いします。
|