你怎么能有一个简单形式的隐藏字段?
以下代码:
= simple_form_for @movie do |f| = f.hidden :title, "some value" = f.button :submit
导致此错误:
undefined method `hidden' for #SimpleForm::FormBuilder:0x000001042b7cd0
尝试这个
= f.input :title, :as => :hidden, :input_html => { :value => "some value" }