Rails “Template is missing” error

后端 未结 2 1119
野性不改
野性不改 2021-01-24 16:29

I am beginner in Rails.

In routes.rb I have

resources :posts

http://i.imgur.com/FlGROJC.png?1

when I click to \"Ad

相关标签:
2条回答
  • 2021-01-24 17:05

    That means that Rails is looking for posts/new.html.erb, and you don't have a posts/new.html.erb file. (Or haml file, or whatever templating language you're using.

    0 讨论(0)
  • 2021-01-24 17:08

    You have

    render "New"
    

    in your controller. You should change it to:

    render "new"
    
    0 讨论(0)
提交回复
热议问题