Permalink
Browse files

Revert "to_json => as_json"

This reverts commit 7a6d8e4.

Reason: The method that gives you a Ruby string with JSON source code is #to_json
  • Loading branch information...
1 parent 27512c2 commit dcdb8bae389e3b3071474cc1bfaae9f85b6d7772 @fxn fxn committed Aug 25, 2010
@@ -1380,7 +1380,7 @@ page.insert_html :bottom, 'my_list', '<li>Last item</li>'
h5. literal
-Returns an object whose as_json evaluates to the code provided. Use this to pass a literal JavaScript expression as an argument to another JavaScriptGenerator method.
+Returns an object whose to_json evaluates to the code provided. Use this to pass a literal JavaScript expression as an argument to another JavaScriptGenerator method.
h5. redirect_to
@@ -285,7 +285,7 @@ JSON is a javascript data format used by many AJAX libraries. Rails has built-in
render :json => @product
</ruby>
-TIP: You don't need to call +as_json+ on the object that you want to render. If you use the +:json+ option, +render+ will automatically call +as_json+ for you.
+TIP: You don't need to call +to_json+ on the object that you want to render. If you use the +:json+ option, +render+ will automatically call +to_json+ for you.
h5. Rendering XML

0 comments on commit dcdb8ba

Please sign in to comment.