【发布时间】:2010-03-02 12:13:02
【问题描述】:
我在 HAML 表单中使用 formatastic。
- 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 方法,这导致了问题。有关详细信息,请参阅下面的答案。
【问题讨论】:
标签: ruby-on-rails ruby formtastic