Undefined "action" method for Formtastic :: FormBuilder

I have rails 3.1.3 and formtastic 2.0.2.

I use the most basic form you can imagine:

<%= semantic_form_for @customer do |f| %> <%= f.inputs %> <%= f.actions %> <% end %> 

I get the following error:

 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' 

When I comment on f.actions , the form works.

I tried everything I could find, but I was very stuck at this point.

+6
source share
1 answer

Apparently version 2.0.2 of formtastic does not support f.actions. Use f.buttons or upgrade formtastic to 2.1.0.beta1, which I do not recommend to you, since it is a beta version and was released a few days ago.

+16
source

Source: https://habr.com/ru/post/906401/


All Articles