defunkt/jquery-pjax — pull request #302 by onyxrev (2013-07-12 19:05:59+00:00)
Title: fix for handleSubmit not properly adding hidden _pjax param (ie. back button issues)

Also see defunkt/jquery-pjax#270

The problem is that handleSubmit produces an array of key/value pairs, which is different than the other pjax submission cases. In the common case jquery.pjax adds the _pjax=true param to the query string. In the handleSubmit case this param is lost. Here I've made handleSubmit deal with the pjax key directly and the pjax common case defers to the upstream format.

At the end of the day the param gets sent down the same: &_pjax=true and everything is happy.

I think this solves the issue slightly better than the solution posted in defunkt/jquery-pjax#270 and also includes a test to illustrate the failure case.