-1

Hello stuck in this problem
`

> Missing partial products/_nav, application/_nav with {:locale=>[:en],
> :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw,
> :ruby, :coffee, :haml, :jbuilder]}

`

<%= render "nav" %> path to views/application.html.erb

_nav.html.haml

Gemfile: gem 'rails', '4.2.5' ... gem 'sass-rails', '~> 5.0' ... gem "haml-rails" gem 'bootstrap-sass', '~> 3.3.6'

Narasimha Reddy - Geeker
  • 3,510
  • 2
  • 18
  • 23
grisha
  • 1
  • 1

1 Answers1

0

First like someone told you in a comment is html.haml then since rails uses convention over configuration, whenever you say render "something" it will look for that something in the same folder of the file that called the render method. So if you are in a product view inside the products folder it will look for "something" in that folder.

Sometimes the problem is that you called the folder product instead of products or vice versa (depends on how you called the controller)

If you want to render a partial that is not in that folder (maybe you want to reuse a partial of other view) you have to:

render 'my_other_model/navbar' 
alebian
  • 786
  • 5
  • 17