mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge remote branch 'docrails/master'
This commit is contained in:
commit
5dd92726a9
2 changed files with 2 additions and 2 deletions
|
@ -1380,7 +1380,7 @@ page.insert_html :bottom, 'my_list', '<li>Last item</li>'
|
||||||
|
|
||||||
h5. literal
|
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
|
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
|
render :json => @product
|
||||||
</ruby>
|
</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
|
h5. Rendering XML
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue