Rails on pjax. layout issue

I am using rack-pjax gem as described in the railscasts playing with
pjaxhttp://railscasts.com/episodes/294-playing-with-pjax?view=comments

But the issue i am having with my layout is, i have some dynamic
generated
links and page headings on top of the main ‘yield’ call in the
application
layout. Those links will be generated dynamically based the main yield.
Though i am putting the dynamically loaded part in the
data-pjax-container,
that part is still not coming(being invisible). I guess that is because
of
the way pjax works, when ever a pjax request goes to the server, it will
carry a ‘X-PJAX’ header and the server doesn’t load the whole layout if
it
finds the X-PJAX in the headers.

%div{:id = “content”, :data => {“pjax-container” => true}}

#context_menu
= THE DYNAMICALLY GENERATED CONTENT GOES HERE
.clear

#pageHeading
#breadcrumbs
= THE DYNAMICALLY GENERATED CONTENT GOES HERE
.clear

.bodytext
  = yield   / THIS IS THE MAIN YIELD
.clear

Any suggestions to get around this please…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs