다음 위치의 시작 레일 가이드를 따르고 있습니다. http://guides.rubyonrails.org/getting_started.html 코드는 여기에서와 동일하지만 이해가되지 않습니다. 10 번 줄의 "comments.post"에서 내가 뭘 잘못하고 있니?NoMethodError in posts # show
undefined method `post' for #<Comment:0x007ff05072c110>
추출 소스 (라인 # 10의 주위에) : 라인 # 10 제기
NoMethodError in Posts#show
Showing /Users/franklinexpress/rails_projects/wal/app/views/comments/_comment.html.erb
7: <b>Comment:</b>
8: <%= comment.comment %>
9: </p>
10: <%= link_to 'Destroy Comment', [comment.post, comment],
11: :confirm => 'Are you sure?',
12: :method => :delete %>
13:
의견 게시 모델하시기 바랍니다. –
해당 가이드의 link_to 형식이 표시되지 않습니다. form_for 이외의 가이드에서 정확히 어디에 있습니까? –
해당 코드는 '9 개의 댓글 삭제 중'섹션에 있습니다. – Azolo