質問編集履歴

3

改善

2020/07/04 06:46

投稿

atage517
atage517

スコア36

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,7 @@
48
48
 
49
49
  <div class="form-body">
50
50
 
51
- <textarea name="question"></textarea>
51
+ <textarea name="content"></textarea>
52
52
 
53
53
  <br>
54
54
 
@@ -92,7 +92,7 @@
92
92
 
93
93
  def create
94
94
 
95
- @post = Post.new(title: params[:title], question: params[:question])
95
+ @post = Post.new(title: params[:title], content: params[:content])
96
96
 
97
97
  @post.save
98
98
 

2

修正

2020/07/04 06:45

投稿

atage517
atage517

スコア36

test CHANGED
File without changes
test CHANGED
@@ -92,7 +92,7 @@
92
92
 
93
93
  def create
94
94
 
95
- @post = Post.new(title: params[:title], question: params[:title])
95
+ @post = Post.new(title: params[:title], question: params[:question])
96
96
 
97
97
  @post.save
98
98
 

1

改善

2020/07/04 06:43

投稿

atage517
atage517

スコア36

test CHANGED
File without changes
test CHANGED
@@ -92,6 +92,10 @@
92
92
 
93
93
  def create
94
94
 
95
+ @post = Post.new(title: params[:title], question: params[:title])
96
+
97
+ @post.save
98
+
95
99
  redirect_to("/posts/index")
96
100
 
97
101
  end