jquery-pjax
jquery-pjax copied to clipboard
fix get fallback
This fix a problem when GET method comes to fallbackPjax.
Usually in GET method, we tend to use
{
url: '/?a=1&b=2'
}
rather than
{
url: '/',
data: 'a=1&b=2'
}
But any parameters written in action attribute of <form> element with GET method will be ignored.
e.g.
<form action="/?a=1&b=2" method='GET'>
is equivalent to
<form action="/' method='GET'>
Thus we need to add these parameters using hidden input.
Thanks. I'd like to see a failing test for this first that this commit fixes.