I have a model an a controller for a pages resource. I need to be able to access the names of the pages and the pages and link_to from within the Application.html.erb
I have tried rendering a navigation partial. But you can't access the controller from a partial. I need to be able to render a navbar that has access the @pages variable so I can loop through them.
What's the best way to do this?