質問編集履歴
4
migrationの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -237,3 +237,35 @@
|
|
237
237
|
|
238
238
|
|
239
239
|
```
|
240
|
+
|
241
|
+
migrate/20180628045953_create_blogposts_rb
|
242
|
+
|
243
|
+
```
|
244
|
+
|
245
|
+
class CreateBlogposts < ActiveRecord::Migration[5.2]
|
246
|
+
|
247
|
+
def change
|
248
|
+
|
249
|
+
create_table :blogposts do |t|
|
250
|
+
|
251
|
+
t.text :title
|
252
|
+
|
253
|
+
t.text :read
|
254
|
+
|
255
|
+
t.text :contact
|
256
|
+
|
257
|
+
t.integer :bloggenre_id
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
t.timestamps
|
262
|
+
|
263
|
+
end
|
264
|
+
|
265
|
+
end
|
266
|
+
|
267
|
+
end
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
```
|
3
編集
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
データ
|
1
|
+
データ送信の際に、No Method Error が出る
|
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
ブログ記事の
|
1
|
+
ブログ記事のデータを更新するミニブログみたいなのを作成してまして、追加しようとしたらエラーが出たので助言のほど宜しくお願いします。
|
2
2
|
|
3
3
|
![イメージ説明](b93ddc42f34a7f9d803ffefe99a912d3.png)
|
4
4
|
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
![![イメージ説明](748f98b4a4e2986aa61b98f17e35e3a5.png)
|
9
|
+
![![イメージ説明](748f98b4a4e2986aa61b98f17e35e3a5.png)
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
|
13
|
-
|
11
|
+
add.html.erb
|
12
|
+
|
13
|
+
```
|
14
14
|
|
15
15
|
<h1>Blogposts#add</h1>
|
16
16
|
|
@@ -110,7 +110,9 @@
|
|
110
110
|
|
111
111
|
```
|
112
112
|
|
113
|
-
|
113
|
+
blogposts_controller.rb
|
114
|
+
|
115
|
+
```
|
114
116
|
|
115
117
|
class BlogpostsController < ApplicationController
|
116
118
|
|
@@ -192,7 +194,9 @@
|
|
192
194
|
|
193
195
|
```
|
194
196
|
|
195
|
-
|
197
|
+
index.html.erb
|
198
|
+
|
199
|
+
```
|
196
200
|
|
197
201
|
<h1>Blogposts#index</h1>
|
198
202
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
![![イメージ説明](748f98b4a4e2986aa61b98f17e35e3a5.png)
|
9
|
+
![![イメージ説明](748f98b4a4e2986aa61b98f17e35e3a5.png)16299.png)
|
10
10
|
|
11
11
|
|
12
12
|
|