Permalink
Browse files

AJAX -> Ajax in layouts_and_rendering guide.

Fixed in the JS guide in 8c38172
  • Loading branch information...
henrik committed Oct 25, 2012
1 parent 4fee5df commit cc5dfccddab6b08b924799cca8be8edd17d479af
Showing with 3 additions and 3 deletions.
  1. +3 −3 guides/source/layouts_and_rendering.md
@@ -124,7 +124,7 @@ Cache-Control: no-cache
$
```
-We see there is an empty response (no data after the `Cache-Control` line), but the request was successful because Rails has set the response to 200 OK. You can set the `:status` option on render to change this response. Rendering nothing can be useful for AJAX requests where all you want to send back to the browser is an acknowledgment that the request was completed.
+We see there is an empty response (no data after the `Cache-Control` line), but the request was successful because Rails has set the response to 200 OK. You can set the `:status` option on render to change this response. Rendering nothing can be useful for Ajax requests where all you want to send back to the browser is an acknowledgment that the request was completed.
TIP: You should probably be using the `head` method, discussed later in this guide, instead of `render :nothing`. This provides additional flexibility and makes it explicit that you're only generating HTTP headers.
@@ -259,13 +259,13 @@ You can send plain text - with no markup at all - back to the browser by using t
render :text => "OK"
```
-TIP: Rendering pure text is most useful when you're responding to AJAX or web service requests that are expecting something other than proper HTML.
+TIP: Rendering pure text is most useful when you're responding to Ajax or web service requests that are expecting something other than proper HTML.
NOTE: By default, if you use the `:text` option, the text is rendered without using the current layout. If you want Rails to put the text into the current layout, you need to add the `:layout => true` option.
#### Rendering JSON
-JSON is a JavaScript data format used by many AJAX libraries. Rails has built-in support for converting objects to JSON and rendering that JSON back to the browser:
+JSON is a JavaScript data format used by many Ajax libraries. Rails has built-in support for converting objects to JSON and rendering that JSON back to the browser:
```ruby
render :json => @product

0 comments on commit cc5dfcc

Please sign in to comment.