Created
December 23, 2008 18:57
-
-
Save djanowski/39420 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| get '/posts/:id' do | |
| # Render with or without a layout depending | |
| # on request#xhr?. Useful for rendering regular | |
| # requests and also partial updates like: | |
| # $("#post").load('/posts/1') | |
| haml :'posts/show', :layout => !request.xhr? | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment