然後就這樣摸了兩個月(死眼)。
先看魔術表演的說明書
<%= link_to_function "新增資料" do |page| page.insert_html :after, :repairdetail , :partial => 'editdetail' , :object => Repairdetail.new
end %> page.insert_html後面 after一參數為指定要第二個參數 repairdetail 的畫面標籤要after他(也可before等,railsCast是用div 在這裡我是指定tr標籤,對我的關鍵就是要換成tr T_T。順便一提,tr標籤就沒有bottom或top的用法了,會沒有反應),然後再呼叫partial分頁名,內容是
Repairdetail.new就這樣,因為沒有基礎而卡了那麼久,想來就嘔……