質問編集履歴
1
config/routes.rbのコードを追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -72,6 +72,38 @@
|
|
72
72
|
|
73
73
|
```
|
74
74
|
|
75
|
+
### 該当のソースコード(config/routes.rb)
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
```ここに言語名を入力
|
80
|
+
|
81
|
+
Rails.application.routes.draw do
|
82
|
+
|
83
|
+
devise_for :users
|
84
|
+
|
85
|
+
devise_scope :user do
|
86
|
+
|
87
|
+
get '/users/sign_out' => 'devise/sessions#destroy'
|
88
|
+
|
89
|
+
end
|
90
|
+
|
91
|
+
root to: 'posts#index'
|
92
|
+
|
93
|
+
resources :posts, only: [:create] do
|
94
|
+
|
95
|
+
get :search, on: :collection
|
96
|
+
|
97
|
+
resources :comments, only: [:create, :edit, :update]
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
```
|
106
|
+
|
75
107
|
### 該当のソースコード(views/posts/search.html.haml 検索窓部抜粋)
|
76
108
|
|
77
109
|
|