2012-01-19 1 views
6

私はレール3.1.3とformtastic 2.0.2を持っています。Formtastic :: FormBuilderの未定義のメソッド 'actions'

私はあなたが想像できる最も基本的なフォームを使用しています:

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' 

は私が f.actions、フォームの作品をコメントアウト:

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

は、私は次のエラーを取得します。

私が見つけることができたすべてを試しましたが、私はこの時点で非常に固執しています。

答えて

16

明らかに、formtasticのバージョン2.0.2はf.actionsをサポートしていません。 f.buttonsを使用するか、formtasticを2.1.0.beta1にアップグレードしてください。これはベータ版であり、数日前にリリースされたのでお勧めしません。

+1

ありがとうございます。 Githubページからコードフラグメントを直接コピーしました。私はf.buttonsで置き換えられ、今はうまくいきます。 –

+0

#Formtastic :: FormBuilder:0x007f81ea7d99c0> ' – Nerian

+0

のための'未定義のメソッド 'アクションがありますか?どのformtasticのverisonを使用していますか? –

関連する問題