Fre*_*III 6 ruby-on-rails undefined formtastic
我有rails 3.1.3和formtastic 2.0.2.
我正在使用你能想象到的最基本的形式:
<%= semantic_form_for @customer do |f| %>
<%= f.inputs %>
<%= f.actions %>
<% end %>
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Completed 500 Internal Server Error in 652ms
ActionView::Template::Error (undefined method `actions' for #<Formtastic::FormBuilder:0x00000128249018>):
2:
3: <%= semantic_form_for @customer do |f| %>
4: <%= f.inputs %>
5: <%= f.actions %>
6: <% end %>
app/views/customers/new.html.erb:5:in `block in _app_views_customers_new_html_erb___3455593051620241935_2485943640'
app/views/customers/new.html.erb:3:in `_app_views_customers_new_html_erb___3455593051620241935_2485943640'
Run Code Online (Sandbox Code Playgroud)
当我评论f.actions时,表格有效.
尝试了我能找到的一切,但我在这一点上非常困难.
Nic*_*nil 16
显然,版本2.0.2的formtastic不支持f.actions.使用f.buttons或将formtastic升级到2.1.0.beta1我不推荐你,因为它是测试版,并在几天前发布.