Navigate with partials using rails and bootstrap -


i'm using rails bootstrap. have basic page navbar along top. struggling achieve how define targets options in navbar partials beneath navbar.

i've trawled threads on here - finding things don't quite marry above, , followed following tutorial: http://ruby.railstutorial.org/chapters/filling-in-the-layout#sec-partials ... didn't work. no matter try, end link directs whole new page.

my code stands (based on above quoted tutorial)....

snippet 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 1 of above tags:

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

and completeness, placeholder authentication/_perforce.erb:

<p>this dummy p4 partial</p> 

can point out going wrong? thank :)

you're missing leading slash / in link_to url parameter:

<ul class="nav navbar-nav">   <li class="active"><%= link_to "p4 sync", "/p4syncpartial" %></li>   <li><%= link_to "p4 output", "/p4outpartial" %></li> </ul> 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -