Getting Pjax to work
When testing Pjax, be sure to deliver only a code fragment using something like they suggest on the page:
if request.headers['X-PJAX']
render :layout => false
end
If you send the full page, it forces a browser refresh, even though the data was requested via the Pjax call.
Seem obvious in retrospect, but might save somebody some head scratching.
Written by Allan Kent
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#