I have a partial view called _footer.html.erb (I created only this file manually) in my app/views/layouts folder. In my app/views/layouts/application.html.erb file, I have:
<%= render 'layouts/_footer.html.erb' %>
When I open the page, I get the following error:
Missing partial layouts/_footer.html.erb with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee]}. Searched in:
* "D:/rails/TestApp/app/views"
I've made some research and, as far as I understood, the only requirement is the underscore before the name. Did I miss something? I am following this tutorial
Note the underscore and file extension are dropped from the filename _footer.html.erb.
Try this:
<%= render 'layouts/footer' %>
see more here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With