ruby on rails - Using turbolinks with dynamic layouts -


i rendering different layouts each controller so:

# layouts/student.html.erb: <% content_for :stylesheets %>   #menu_container {background-color: #3085bd;} <% end %> <% content_for :side_menu %>   <h4 style="text-align: center;"> students</h4> <% end %> <%= render :template => 'layouts/application' %> 

using turbolinks, i've found layout not changing when navigate between different parts of site. page refresh fixes everything.

is there way tell turbolinks grab layout along page content?

i got work placing following lines within body tag of application.html.erb:

<%= content_for?(:side_menu) ? yield(:side_menu) : yield %> <style type="text/css">  <%= content_for?(:stylesheets) ? yield(:stylesheets) : yield %> </style> 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -