質問編集履歴

1

routes.rbの追加

2021/06/04 04:45

投稿

sawasawanosawa
sawasawanosawa

スコア4

test CHANGED
File without changes
test CHANGED
@@ -29,6 +29,50 @@
29
29
  rack_session_access :0.2.0
30
30
 
31
31
  cloud9
32
+
33
+ ###コード
34
+
35
+ routes.rb
36
+
37
+ ```
38
+
39
+ Rails.application.routes.draw do
40
+
41
+ get 'posts/index' => "posts#index"
42
+
43
+ get 'posts/new' => "posts#new"
44
+
45
+ get '/auth/twitter/callback' => 'sessions#create'
46
+
47
+ get '/logout' => 'sessions#destroy'
48
+
49
+
50
+
51
+ post "posts/create" => "posts#create"
52
+
53
+ post "posts/:id/destroy" => "posts#destroy"
54
+
55
+
56
+
57
+ get "posts/like" => "posts#like"
58
+
59
+
60
+
61
+ get '/' => "posts#index"
62
+
63
+ root 'posts#index'
64
+
65
+ #get "posts/:id" => "posts#index"
66
+
67
+
68
+
69
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
70
+
71
+ end
72
+
73
+
74
+
75
+ ```
32
76
 
33
77
  ###行ったこと
34
78