この投稿で新しいページを開く投稿のタイトルにリンクを作成しようとしています。試し<%= link_to post.title, posts_path(path) %>
ましたが、エラーが発生しました
undefined local variable or method `posts_path' for #<#<Class:0x007fbf134f2b88>:0x007fbf13c17d78>
私は何を間違っていますか?
レーキ:ルート:
posts_index GET /posts/index(.:format) posts#index
posts_new GET /posts/new(.:format) posts#new
posts_create POST /posts/create(.:format) posts#create
GET /posts/:id(.:format) posts#show
root / home#index
root / home#index
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
users GET /users(.:format) users#index
user GET /users/:id(.:format) users#show