我formatastic
以 HAML 形式使用。
- semantic_form_for @company do |f|
- f.inputs do
= f.input :description
= f.input :type
= f.input :industry
= f.input :hq
= f.input :products
= f.input :subsidiaries
= f.input :employees
= f.input :revenue
= f.input :net_income
= f.buttons
每当我尝试保存现有记录时,都会出现错误。
Template is missing
Missing template companies/update.erb in view path app/views
我最近将表单从 ERB 迁移到 HAML。用于在 ERB 中工作的表格。
我该如何解决这个问题?
编辑
我解决了这个问题。它与 HAML 或 Formtastic 无关。我正在向该方法传递一个块,save
这导致了问题。有关详细信息,请参阅下面的答案。