【发布时间】:2012-03-22 18:35:38
【问题描述】:
我正在使用https://github.com/plataformatec/simple_form 并尝试发送一个额外的参数。我有一个 Task、List 和 ListTask 模型,在列表的新页面中我希望能够插入将要添加的任务数量。当您提交时,它会将您发送到新的 list_task 页面,其中填充了正确数量的表单。
=simple_form_for @list do |s|
=s.input :title
=s.input :task_count
=s.button :submit
这会产生错误undefined method task_count,这是有道理的,因为它不是列表中的方法。
【问题讨论】:
标签: ruby-on-rails activerecord simple-form