Browse files

Added some Rails how to on pjax server side in Readme file.

  • Loading branch information...
1 parent 7d9841e commit 5285e9d79841e1eb179774cdb84800300d9af4e2 @michaelkoper michaelkoper committed Nov 24, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.md
View
15 README.md
@@ -154,6 +154,21 @@ def my_page
end
```
+Or as a before filter in application controller:
+
+```ruby
+layout :set_layout
+
+private
+ def set_layout
+ if request.headers['X-PJAX']
+ false
+ else
+ "application"
+ end
+ end
+```
+
Django: <https://github.com/jacobian/django-pjax>
Asp.Net MVC3: <http://biasecurities.com/blog/2011/using-pjax-with-asp-net-mvc3/>

0 comments on commit 5285e9d

Please sign in to comment.