Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

not compatible with rails 3.1.1 #16

Open
yunjiangster opened this issue Oct 25, 2011 · 0 comments
Open

not compatible with rails 3.1.1 #16

yunjiangster opened this issue Oct 25, 2011 · 0 comments

Comments

@yunjiangster
Copy link

I deleted the Gemfile.lock file and upgraded to the latest version of rails. Then I get the following error:

ArgumentError in Surveys#new

Showing /home/jyj/rubys/complex-form-examples-99f5680/app/views/surveys/_form.html.erb where line #7 raised:

wrong number of arguments (4 for 3)

Extracted source (around line #7):

4: <%= f.label :name %>

5: <%= f.text_field :name %>
6:


7: <%= f.fields_for :questions %>
8:

<%= f.link_to_add "Add a question", :questions %>


9:

<%= f.submit "Submit" %>


10: <% end %>

Trace of template inclusion: app/views/surveys/new.html.erb

Rails.root: /home/jyj/rubys/complex-form-examples-99f5680

So it appears that fields_for have different syntax in rails 3.1.1?
Is there a quick fix for that? Also how do I set the partial file that fields_for accesses?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant