精華區beta Ruby 關於我們 聯絡資訊
今天寫 Rails 寫到一半 突然發現出現 wrong number of arguments (0 for 1) 然後整個 controller 裡面的頁面都出現同一個 Error 之前寫的同一個controller, 裡面正常的頁面全部都不能 work 全部都覆蓋在這個Error之下 翻過 Mailing List 之後 我發現到我的 controller 裡面有個 action 叫做 send 這是 ActionController 裡面的 function Ruby 以為我要 Overridden 這個 function 所以才有這種情況 有些錯誤不實際去做還真的不知道 Rails Method 有一些取名的禁忌 DB Column 的名字也有幾個不能取 我列出一些常犯的名字在我的 Blog 上面 http://lightyror.blogspot.com/2006/08/rails_4307.html -- lighty RoR 是一個介紹 lighttpd , SQLite , Ruby on Rails 的 Blog http://lightyror.blogspot.com/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.170.42.242 ※ 編輯: giive 來自: 218.170.42.242 (08/26 19:29) ※ 編輯: giive 來自: 218.170.42.242 (08/26 19:30)
Schelfaniel:send 其實在 Common Lisp 也是類似的用法(剛好看到的) 08/26 20:57