質問編集履歴
1
edit画面の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -107,3 +107,49 @@
|
|
107
107
|
update: 更新
|
108
108
|
|
109
109
|
```
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
### edit.html.erb
|
114
|
+
|
115
|
+
```
|
116
|
+
|
117
|
+
<h1>タスク編集画面</h1>
|
118
|
+
|
119
|
+
注:登録ボタンを押すとupdateアクションに処理が飛ぶ
|
120
|
+
|
121
|
+
<%= form_for @task do |f| %>
|
122
|
+
|
123
|
+
<div>
|
124
|
+
|
125
|
+
<%= f.text_field :title %>
|
126
|
+
|
127
|
+
<%= f.label :title %>
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<div>
|
134
|
+
|
135
|
+
<%= f.text_field :content %>
|
136
|
+
|
137
|
+
<%= f.label :content %>
|
138
|
+
|
139
|
+
</div>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<div>
|
144
|
+
|
145
|
+
<%= f.submit class: 'btn btn-primary btn-sm' %>
|
146
|
+
|
147
|
+
</div>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
<%= link_to '戻る',tasks_path, class: "btn-sm btn-light" %>
|
152
|
+
|
153
|
+
<% end %>
|
154
|
+
|
155
|
+
```
|