回答編集履歴

1

修正

2018/12/03 11:56

投稿

退会済みユーザー
test CHANGED
@@ -1,53 +1,7 @@
1
- > ```ruby
2
-
3
- class TweetsController < ApplicationController
4
-
5
- ...
6
-
7
- def new
8
-
9
- @tweets = Tweet.new
1
+ とりあえずこれでcreateアクションには行くと思います。
10
-
11
- end
12
-
13
- ...
14
-
15
- end
16
-
17
- > ```
18
2
 
19
3
  ```ruby
20
4
 
21
- class TweetsController < ApplicationController
5
+ <%= form_for @tweets, url: {action: 'create'} do |form| %>
22
-
23
- ...
24
-
25
- def new
26
-
27
- @tweet = Tweet.new
28
-
29
- end
30
-
31
- ...
32
-
33
- end
34
6
 
35
7
  ```
36
-
37
-
38
-
39
- > ```erb
40
-
41
- <%= form_for (@tweets) do |form| %>
42
-
43
- > ```
44
-
45
-
46
-
47
- ```erb
48
-
49
- <%= form_for (@tweet) do |form| %>
50
-
51
- ```
52
-
53
- にしてみるとどうですか?