質問編集履歴
1
routes\.rbについて追記しました。失礼いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -158,7 +158,71 @@
|
|
158
158
|
|
159
159
|
```
|
160
160
|
|
161
|
-
|
161
|
+
```
|
162
|
+
|
163
|
+
`routes.rb`
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
Rails.application.routes.draw do
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
resources :my_threads do
|
172
|
+
|
173
|
+
resources :responses
|
174
|
+
|
175
|
+
end
|
176
|
+
|
177
|
+
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
|
178
|
+
|
179
|
+
end
|
180
|
+
|
181
|
+
```
|
182
|
+
|
183
|
+
```
|
184
|
+
|
185
|
+
rake routesした結果
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
Prefix Verb URI Pattern Controller#Action
|
190
|
+
|
191
|
+
my_thread_responses GET /my_threads/:my_thread_id/responses(.:format) responses#index
|
192
|
+
|
193
|
+
POST /my_threads/:my_thread_id/responses(.:format) responses#create
|
194
|
+
|
195
|
+
new_my_thread_response GET /my_threads/:my_thread_id/responses/new(.:format) responses#new
|
196
|
+
|
197
|
+
edit_my_thread_response GET /my_threads/:my_thread_id/responses/:id/edit(.:format) responses#edit
|
198
|
+
|
199
|
+
my_thread_response GET /my_threads/:my_thread_id/responses/:id(.:format) responses#show
|
200
|
+
|
201
|
+
PATCH /my_threads/:my_thread_id/responses/:id(.:format) responses#update
|
202
|
+
|
203
|
+
PUT /my_threads/:my_thread_id/responses/:id(.:format) responses#update
|
204
|
+
|
205
|
+
DELETE /my_threads/:my_thread_id/responses/:id(.:format) responses#destroy
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
my_threads GET /my_threads(.:format) my_threads#index
|
210
|
+
|
211
|
+
POST /my_threads(.:format) my_threads#create
|
212
|
+
|
213
|
+
new_my_thread GET /my_threads/new(.:format) my_threads#new
|
214
|
+
|
215
|
+
edit_my_thread GET /my_threads/:id/edit(.:format) my_threads#edit
|
216
|
+
|
217
|
+
my_thread GET /my_threads/:id(.:format) my_threads#show
|
218
|
+
|
219
|
+
PATCH /my_threads/:id(.:format) my_threads#update
|
220
|
+
|
221
|
+
PUT /my_threads/:id(.:format) my_threads#update
|
222
|
+
|
223
|
+
DELETE /my_threads/:id(.:format) my_threads#destroy
|
224
|
+
|
225
|
+
```
|
162
226
|
|
163
227
|
###試したこと
|
164
228
|
|