這看起來很基本,但我使用Rails 5,並將所有視圖交換到YAML而不是ERB。現在,我的測試一個失敗說以下內容: ActionController::UnknownFormat: ProductsController#index is missing a template for this request format and variant.
request.formats: ["text
任何人都可以解釋這個錯誤嗎?嘗試在ERB文件中分割和減去。我相信最好的做法是在控制器中做,但寧可不行。 ActionView::Template::Error (AcctLedger can't be coerced into Fixnum):
Mar 09 00:25:34 myapp app/web.2: 107:
Mar 09 00:25:34 myapp ap
感謝您閱讀,我不確定如何爲選擇框的Rails窗體幫助器編寫方法參數。 假設我有以下類: class School
attr_accessor :students
def initialize
students = []
end
end
class Student
attr_accessor :teacher
atrr_accesso