質問編集履歴
1
コードの追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -8,4 +8,32 @@
|
|
8
8
|
idがshowメソットに記されていないという認識で間違いないですよね?
|
9
9
|
SequelProを見ても、notesテーブルにきちんと投稿したカラムにidが書かれています。
|
10
10
|
何かコマンドを打ち忘れ、データが反映されていないのでしょうか?
|
11
|
-
回答お願いします。
|
11
|
+
回答お願いします。
|
12
|
+
|
13
|
+
routes.rbは
|
14
|
+
Rails.application.routes.draw do
|
15
|
+
|
16
|
+
devise_for :users
|
17
|
+
resources :users, only: [:index, :show, :edit, :update]
|
18
|
+
resources :notes, only: [:show, :create, :edit, :update, :destroy]
|
19
|
+
|
20
|
+
get'/top' => 'home#top'
|
21
|
+
|
22
|
+
get'/connection' => 'home#connection'
|
23
|
+
get'/notes/new' => 'notes#new'
|
24
|
+
post'/notes' =>'notes#create'
|
25
|
+
get'/notes' =>'notes#index'
|
26
|
+
get'/show' =>"notes#show"
|
27
|
+
get'/edit' =>'notes#edit'
|
28
|
+
patch'/notes/:id' =>"notes#update",as:'update_note'
|
29
|
+
delete'/notes/:id' =>"notes#destroy",as:'destroy_note'
|
30
|
+
|
31
|
+
post '/like/:note_id' => 'likes#like', as: 'like'
|
32
|
+
delete '/unlike/:note_id' => 'likes#unlike', as: 'unlike'
|
33
|
+
|
34
|
+
root 'home#top'
|
35
|
+
get'/about' => 'home#about'
|
36
|
+
end
|
37
|
+
のようになっています。
|
38
|
+
idはshowである、のように記述していないのでは?と思って困っています。
|
39
|
+
お願いいたします。
|