質問編集履歴
1
どこまで値が入ってきているのかを確認
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
@company = Company.new(
|
26
26
|
|
27
|
-
agreement_company: params[:company],
|
27
|
+
agreement_company: params[:agreement_company],
|
28
28
|
|
29
29
|
email_adress: params[:email_adress]
|
30
30
|
|
@@ -52,7 +52,7 @@
|
|
52
52
|
|
53
53
|
| 会社
|
54
54
|
|
55
|
-
input.form-control[name="company"]
|
55
|
+
input.form-control[name="agreement_company"]
|
56
56
|
|
57
57
|
.form-group
|
58
58
|
|
@@ -99,3 +99,35 @@
|
|
99
99
|
|
100
100
|
|
101
101
|
```
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
#追記
|
106
|
+
|
107
|
+
gouf様に教えていただいた通りにしてみたところ
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
index.html.slimの```agreement_company```と```email_adress```の二つのパラメータには値が入っているようです。
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
```
|
116
|
+
|
117
|
+
Started GET "/admins/companies?utf8=%E2%9C%93&authenticity_token=2lVJ8XLxDKXOxP2dVVkBzDjBcvlhmo0Mxi67XYEbXMYpGjEe3jBtF5xYgGNxJewyLZyBbI7veScBiTjEm3kabw%3D%3D&agreement_company=Bcompany&email_adress=b%40b.com" for 127.0.0.1 at 2017-08-12 19:15:26 +0900
|
118
|
+
|
119
|
+
Processing by Admins::CompaniesController#index as HTML
|
120
|
+
|
121
|
+
Parameters: {"utf8"=>"✓", "authenticity_token"=>"2lVJ8XLxDKXOxP2dVVkBzDjBcvlhmo0Mxi67XYEbXMYpGjEe3jBtF5xYgGNxJewyLZyBbI7veScBiTjEm3kabw==", "agreement_company"=>"Bcompany", "email_adress"=>"b@b.com"}
|
122
|
+
|
123
|
+
Rendering admins/companies/index.html.slim within layouts/application
|
124
|
+
|
125
|
+
Rendered admins/companies/index.html.slim within layouts/application (18.3ms)
|
126
|
+
|
127
|
+
Completed 200 OK in 50ms (Views: 48.9ms | ActiveRecord: 0.0ms)
|
128
|
+
|
129
|
+
```
|
130
|
+
|
131
|
+
しかし、コントローラーの```params```は```nil```となっていました。
|
132
|
+
|
133
|
+
フォームで受け取った値が、```layouts/application```に入っているということなんでしょうか?
|