RailsCasts Pro episodes are now free!
Learn more or hide this
Resources
Setting up pjax_rails
gem 'pjax_rails'
//= require pjax
<div data-pjax-container> <%= yield %> </div>
<title><%= yield(:title) %></div>
Setting up rack-pjax
gem 'rack-pjax'
config.middleware.use Rack::Pjax
mkdir -p vendor/assets/javascripts curl https://raw.github.com/defunkt/jquery-pjax/master/jquery.pjax.js > vendor/assets/javascripts/jquery.pjax.js
//= require jquery.pjax
jQuery -> $('.product a').pjax('[data-pjax-container]')
<div data-pjax-container> ... </div>