0

I'm using rails with Bootstrap. I have a basic page with navbar along the top. What I am struggling to achieve is how to define the targets for the options in the navbar as partials beneath this navbar.

I've trawled threads on here - finding things that don't quite marry up to the above, and followed the following tutorial: http://ruby.railstutorial.org/chapters/filling-in-the-layout#sec-partials ... which didn't work. No matter what I try, I end up with a link that simply directs to a whole new page.

My code as it stands (based on the above quoted tutorial)....

snippet from post_login.html.erb

            <ul class="nav navbar-nav">
              <li class="active"><%= link_to "P4 Sync", "p4syncpartial" %></li>
              <li><%= link_to "P4 Output", "p4outpartial" %></li>
            </ul>

<<<SNIP!!!>>>

    <div class="container">
    <%= yield %>
    </div>
</body>

routes.rb entry for one of the above tags:

  match '/p4syncpartial', to: 'authentication#_perforce', via: 'get'

And just for completeness, my placeholder authentication/_perforce.erb:

<p>This is a dummy P4 partial</p>

Can anyone point out where I am going wrong? Thank you :)

Steve Hall
  • 469
  • 1
  • 5
  • 23
  • I'm sorry, I thought that was what you were trying to do! I'm clearly not understanding the question - however I would really recommend reading the guide I posted above because I think you've got a few different things muddled. Best of luck! – omnikron Mar 24 '14 at 15:34