Background: Building a small app where the intention is that full page loads do not happen after initially arriving to the app. Implemented pjax_rails plugin. However create, update, and destroy actions (and anything that executes a redirect_to) cause a full page load.
Question: How can I get around this while still using pjax (and preferably still using the pjax_rails gem)? I know how the problem could be solved with ajax, but it would be much better if the whole thing could be taken care of with this pjax implementation; history, degradability, etc.
To save clarification time, these things have been done:
Gemfile
gem 'pjax_rails'
application.js (including other requires in case there's some conflict I don't know about)
//= require jquery
//= require jquery_ujs
//= require jquery.pjax
//= require twitter/bootstrap
//= require_tree .
// Explicitly specify which links have PJAX enabled.
$(function() {
$('a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax('[data-pjax-container]');
});
Also tried the following in application.js in case there's something I'm overlooking
$('a').pjax('[data-pjax-container]');
And tried
$('a').pjax('[data-pjax-container]', { timeout: 200000 });
application.html.erb
<div data-pjax-container>
<%= yield %>
</div>