{"id":13994875,"url":"https://github.com/eval/rack-pjax","last_synced_at":"2025-05-16T14:08:30.003Z","repository":{"id":1537732,"uuid":"1838955","full_name":"eval/rack-pjax","owner":"eval","description":"pjax for rails and rack applications","archived":false,"fork":false,"pushed_at":"2019-03-24T13:33:43.000Z","size":237,"stargazers_count":205,"open_issues_count":7,"forks_count":65,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-12T12:52:33.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://rack-pjax.herokuapp.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"FarMcKon/gitmarks_2","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eval.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-06-02T19:28:12.000Z","updated_at":"2024-07-31T17:28:13.000Z","dependencies_parsed_at":"2022-08-16T13:40:32.086Z","dependency_job_id":null,"html_url":"https://github.com/eval/rack-pjax","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Frack-pjax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Frack-pjax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Frack-pjax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eval%2Frack-pjax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eval","download_url":"https://codeload.github.com/eval/rack-pjax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254544146,"owners_count":22088807,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:03:09.489Z","updated_at":"2025-05-16T14:08:24.995Z","avatar_url":"https://github.com/eval.png","language":"Ruby","readme":"Rack-pjax [![travis](https://secure.travis-ci.org/eval/rack-pjax.png?branch=master)](https://secure.travis-ci.org/#!/eval/rack-pjax)\n========\n\nRack-pjax is middleware that lets you serve 'chrome-less' pages in respond to [pjax-requests](https://github.com/defunkt/jquery-pjax).\n\nIt does this by stripping the generated body; only the title and inner-html of the pjax-container are sent to the client.\n\nWhile this won't save you any time rendering the page, it gives you more flexibility where and how to define the pjax-container.\nRyan Bates featured [rack-pjax on Railscasts](http://railscasts.com/episodes/294-playing-with-pjax) and explains how this gem compares to [pjax_rails](https://github.com/rails/pjax_rails).\n\n[![railscast](http://railscasts.com/assets/railscasts_logo-7101a7cd0a48292a0c07276981855edb.png)](http://railscasts.com/)\n\nInstallation\n------------\n\nCheck out the [Railscasts' notes](http://railscasts.com/episodes/294-playing-with-pjax) how to integrate rack-pjax in your Rails 3.1 application.\n\nYou can find the source from the screencast over [here](https://github.com/ryanb/railscasts-episodes/tree/master/episode-294).\n\nAnother sample-app: the original [pjax-demo](http://pjax.herokuapp.com/) but with rack-pjax onboard can be found in the [sample-app](https://github.com/eval/rack-pjax/tree/sample-app) branch.\n\nThe more generic installation comes down to:\n\nI. Add the gem to your Gemfile\n\n```ruby\n# Gemfile\ngem \"rack-pjax\"\n```\n\nII. Include **rack-pjax** as middleware to your application(-stack)\n\n```ruby\n# config.ru\nrequire ::File.expand_path('../config/environment',  __FILE__)\nuse Rack::Pjax\nrun RackApp::Application\n```\n\nIII. Install [jquery-pjax](https://github.com/defunkt/jquery-pjax). Make sure to add the 'data-pjax-container'-attribute to the container.\n\n```html\n\u003chead\u003e\n  ...\n  \u003cscript src=\"/javascripts/jquery.js\"\u003e\u003c/script\u003e\n  \u003cscript src=\"/javascripts/jquery.pjax.js\"\u003e\u003c/script\u003e\n  \u003cscript type=\"text/javascript\"\u003e\n    $(function(){\n      $(document).pjax('a', '[data-pjax-container]')\n    })\n  \u003c/script\u003e\n  ...\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cdiv data-pjax-container\u003e\n    ...\n  \u003c/div\u003e\n\u003c/body\u003e\n```\n\n(For more see [the docs of jquery-pjax](https://github.com/defunkt/jquery-pjax#usage).)\n\nIV. Fire up your [pushState-enabled browser](http://caniuse.com/#search=pushstate) and enjoy!\n\n\nRequirements\n------------\n\n- Nokogiri\n\n\nContributors\n------\n\n[The contributors](https://github.com/eval/rack-pjax/graphs/contributors).\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feval%2Frack-pjax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feval%2Frack-pjax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feval%2Frack-pjax/lists"}