質問編集履歴

3

文章を編集しました。

2019/12/09 08:04

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,5 @@
1
+ ```
2
+
1
3
  ActiveRecord::RecordNotFound in BooksController#show
2
4
 
3
5
  Couldn't find Book with 'id'=2

2

routes.rbを追加しました。

2019/12/09 08:04

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -1,5 +1,3 @@
1
- ```
2
-
3
1
  ActiveRecord::RecordNotFound in BooksController#show
4
2
 
5
3
  Couldn't find Book with 'id'=2
@@ -235,3 +233,81 @@
235
233
  end
236
234
 
237
235
  ```
236
+
237
+
238
+
239
+ ```
240
+
241
+ $ rake routes
242
+
243
+ Prefix Verb URI Pattern Controller#Action
244
+
245
+ new_user_session GET /users/sign_in(.:format) users/sessions#new
246
+
247
+ user_session POST /users/sign_in(.:format) users/sessions#create
248
+
249
+ destroy_user_session DELETE /users/sign_out(.:format) users/sessions#destroy
250
+
251
+ new_user_password GET /users/password/new(.:format) devise/passwords#new
252
+
253
+ edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
254
+
255
+ user_password PATCH /users/password(.:format) devise/passwords#update
256
+
257
+ PUT /users/password(.:format) devise/passwords#update
258
+
259
+ POST /users/password(.:format) devise/passwords#create
260
+
261
+ cancel_user_registration GET /users/cancel(.:format) users/registrations#cancel
262
+
263
+ new_user_registration GET /users/sign_up(.:format) users/registrations#new
264
+
265
+ edit_user_registration GET /users/edit(.:format) users/registrations#edit
266
+
267
+ user_registration PATCH /users(.:format) users/registrations#update
268
+
269
+ PUT /users(.:format) users/registrations#update
270
+
271
+ DELETE /users(.:format) users/registrations#destroy
272
+
273
+ POST /users(.:format) users/registrations#create
274
+
275
+ root GET / top#top
276
+
277
+ home_about GET /home/about(.:format) top#home
278
+
279
+ users GET /users(.:format) users#index
280
+
281
+ POST /users(.:format) users#create
282
+
283
+ new_user GET /users/new(.:format) users#new
284
+
285
+ edit_user GET /users/:id/edit(.:format) users#edit
286
+
287
+ user GET /users/:id(.:format) users#show
288
+
289
+ PATCH /users/:id(.:format) users#update
290
+
291
+ PUT /users/:id(.:format) users#update
292
+
293
+ DELETE /users/:id(.:format) users#destroy
294
+
295
+ books GET /books(.:format) books#index
296
+
297
+ POST /books(.:format) books#create
298
+
299
+ new_book GET /books/new(.:format) books#new
300
+
301
+ edit_book GET /books/:id/edit(.:format) books#edit
302
+
303
+ book GET /books/:id(.:format) books#show
304
+
305
+ PATCH /books/:id(.:format) books#update
306
+
307
+ PUT /books/:id(.:format) books#update
308
+
309
+ DELETE /books/:id(.:format) books#destroy
310
+
311
+ refile_app /attachments #<Refile::App app_file="/home/ec2-user/.rvm/gems/ruby-2.6.3/bundler/gems/refile-46b4178654e6/lib/refile/app.rb">
312
+
313
+ ```

1

文章を編集しました。

2019/12/09 08:03

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- Couldn't find Book with 'id'=2を解決したい
1
+ Couldn't find Book with 'id'=2を解決したい(Rails)
test CHANGED
File without changes