ruby on rails 3 - Can't use the nested_form_for gem -
i using nested_form_for gem first time. don't know if issue or if using wrong, getting "undefined method nested_form_for" error. have pretty regular form can see:
<%= nested_form_for @user |f| %> <%= f.fields_for :godfathers |godfather_form| %> <%= godfather_form.label :name %> <br/> <%= godfather_form.text_field :name %> <br/> <%= godfather_form.label :description %> <br/> <%= godfather_form.text_field :description %> <br/> <%= godfather_form.link_to_remove "remove godfather" %> <% end %> <%= f.link_to_add "add godfather", :godfathers %> <% end %>
by way, installed gem , ran the: rails generate nested_form:install command
generate nested_form.js file included in layout after jquery inclusion(<%= javascript_include_tag :default, 'nested_form' %>
).
anyone using gem well?
thanks!
everything looks right , if generator ran gem should in place. have restarted server since adding plugin gemfile?
Comments
Post a Comment