Permalink
Browse files

Merge pull request #69 from michaelkoper/master

Some more configuration for Rails
  • Loading branch information...
Chris Wanstrath
Chris Wanstrath committed Feb 7, 2012
2 parents e98de0f + 5285e9d commit a4c1da21542c91fe488e83420739fc539655222f
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.md
View
@@ -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/>

1 comment on commit a4c1da2

@edison

This comment has been minimized.

Show comment Hide comment
@edison

edison Feb 10, 2012

Thats simple but great.

edison commented on a4c1da2 Feb 10, 2012

Thats simple but great.

Please sign in to comment.