轉載自:http://blog.csdn.net/bvbook/archive/2007/08/20/1751786.aspx
一、148 頁
英文: We check that the name is present and unique
原文:我們首先檢查用戶名與密碼都不為空 ?
二、148頁
?? ??? ??? ??? ??? ??? ?
英文:We check that the name is present and unique
原文:我們首先檢查用戶名與密碼都不為空
改為:我們首先檢查用戶名不為空
?? ??? ??? ??? ?
三、153頁
代碼中 flash[:notice] 應為flash.now[:notice]
四、310頁
?? ??? ??? ??? ??? ??? ?
列表中第二個“使用save方法時”應為“使用save!方法時“
?? ??? ??? ??? ??? ??? ?
五、407頁
?? ??? ??? ??? ??? ??? ?
英文:Instead, they provide a regular (and simple) interface to a set of resources.
原文:它們只要為一組資源提供一個普通(并且簡單)的接口就行了
改為:它們只要為一組資源提供一個規則(并且簡單)的接口就行了
?? ??? ??? ??? ?
六、408頁
兩處的 /article/1 應為/articles/1
?? ??? ??? ??? ??? ??? ??? ??? ?
七、456頁
?? ??? ??? ??? ??? ??? ?
原文:默認配置下,cache 只有在產品環境下才生效
改為:默認配置下,cache 只有在生產環境下才生效
?? ??? ??? ??? ?
八、535頁
?? ??? ??? ??? ??? ??? ?
原文:這個輔助方法就是把 remote_function 一個remote_function
改為:這個輔助方法就是把一個remote_function
九、554頁
?? ??? ??? ??? ??? ??? ?
原文:表單可以這些方法交互以提交用戶輸入的內容
改為:表單可以與這些方法交互以提交用戶輸入的內容
?? ??? ??? ??? ?
十、106頁 代碼
?? ??? ??? ??? ?
@product = Product.find(params[:id])
應為?? ??? ?
product = Product.find(params[:id])
110、117相應的代碼也需要改正。
我自己還發現了:
P119
代碼
??? <%= form_remote_tag :url => { :action => :add_to_cart, :id => product } %> ?
???? <%= submit_tag "Add to Cart" %> ?
??? <% end %> ?
應為:
代碼
?? <%= form_remote_tag :url => { :action => :add_to_cart, :id => product } %> ?
????? <%= submit_tag "Add to Cart" %> ?
?? <%= end_form_tag %> ?
106頁
代碼
@product = Product.find(params[:id])
應該是
product = Product.find(params[:id])
?? ??? ??? ??? ??? ??? ?
?? ??? ??? ??? ??? ??? ?
?? ??? ??? ??? ?