I want to add a menu to my First Ever Rails application. Nothing complicated. I developed that I should possibly reference it with application.html.erb, but after that I got stuck.
Here is what I have so far (it's not so much)
<%= render :partial => "menu" %>
If I make a partial call to "menu" in application.html.erb, where do I put the menu file, and what do I call? Do I need to go to the view controller?
Can this be called partial from any folder that I enter?
Part II If I want to show other content in accordance with the presentation in which I participate - how to do it?
<body> <p>[<%= yield :menu %>]</p> <%= yield %> </body> </html>
I'm just learning Rails, so sorry for the stupid questions. In addition, I am interested not only in the solution, but also in the idea of ββbest practices.
source share