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

not compatible with rails 3.1.1 #16

Description

@yunjiangster

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions