質問編集履歴
1
form_withに変更。
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,7 +10,11 @@
|
|
10
10
|
|
11
11
|
```
|
12
12
|
|
13
|
-
|
13
|
+
Parameters: {"authenticity_token"=>"OB1cWXcSMwdS/I3hL67MIym8WYKVpCrPcDm3x0pbh8Ii1W3LJt9wna8V9pplxzK7d43SXTCtR/3C+DsKSR+JUw==", "income"=>{"income"=>"uber"}, "price"=>"11111", "commit"=>"Create Income"}
|
14
|
+
|
15
|
+
Unpermitted parameter: :income
|
16
|
+
|
17
|
+
ターミナルにて、エラー出てて保存できない状態です。
|
14
18
|
|
15
19
|
```
|
16
20
|
|
@@ -22,33 +26,53 @@
|
|
22
26
|
|
23
27
|
_form.html.erb
|
24
28
|
|
29
|
+
|
30
|
+
|
25
31
|
<div class='type'>
|
26
32
|
|
27
33
|
<div class='type-contents'>
|
28
34
|
|
29
|
-
|
35
|
+
<%= form_with(model: @income, local: true) do |form| %>
|
30
36
|
|
31
|
-
|
37
|
+
<%= form.radio_button :income, :uber %>
|
32
38
|
|
33
|
-
|
39
|
+
<%= form.label :income, "ウーバーイーツ", {value: :uber, style: "display: inline-block;"} %>
|
34
40
|
|
35
|
-
|
41
|
+
<%= form.radio_button :income, :uber %>
|
36
42
|
|
37
|
-
|
43
|
+
<%= form.label :income, "食費", {value: :food, style: "display: inline-block;"} %>
|
38
44
|
|
39
|
-
<di
|
45
|
+
<%= form.radio_button :income, :food %>
|
40
46
|
|
41
|
-
|
47
|
+
<%= form.label :income, "日用品", {value: :male, style: "display: inline-block;"} %>
|
42
48
|
|
43
|
-
|
49
|
+
<%= form.radio_button :income, :female %>
|
44
50
|
|
45
|
-
|
51
|
+
<%= form.label :income, "交通費", {value: :female, style: "display: inline-block;"} %><br />
|
46
52
|
|
47
|
-
|
53
|
+
<%= form.radio_button :income, :male %>
|
48
54
|
|
49
|
-
|
55
|
+
<%= form.label :income, "積み立て費", {value: :male, style: "display: inline-block;"} %>
|
50
56
|
|
57
|
+
<%= form.radio_button :income, :female %>
|
58
|
+
|
59
|
+
<%= form.label :income, "クレジットカード", {value: :female, style: "display: inline-block;"} %>
|
60
|
+
|
61
|
+
<%= form.radio_button :income, :male %>
|
62
|
+
|
63
|
+
<%= form.label :income, "ファッション", {value: :male, style: "display: inline-block;"} %>
|
64
|
+
|
65
|
+
<%= form.radio_button :income, :female %>
|
66
|
+
|
67
|
+
<%= form.label :income, "その他", {value: :female, style: "display: inline-block;"} %><br />
|
68
|
+
|
51
|
-
<input type="text" name="
|
69
|
+
<input type="text" name="price" id="price" placeholder="金額"><br />
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<%= form.submit %>
|
74
|
+
|
75
|
+
<% end %>
|
52
76
|
|
53
77
|
|
54
78
|
|