質問編集履歴
1
Controllerのdef result~ と routesのget 'posts/result' を書き忘れていたので、追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -36,6 +36,9 @@
|
|
36
36
|
def show
|
37
37
|
end
|
38
38
|
|
39
|
+
def result
|
40
|
+
end
|
41
|
+
|
39
42
|
def new
|
40
43
|
end
|
41
44
|
|
@@ -62,6 +65,7 @@
|
|
62
65
|
Rails.application.routes.draw do
|
63
66
|
get 'posts/index'
|
64
67
|
get 'posts/show'
|
68
|
+
get 'posts/result'
|
65
69
|
get 'posts/new'
|
66
70
|
post "posts" => "posts#create"
|
67
71
|
end
|