I have the form in index.erb.html file. (upload controller). When i call localhost:3000/upload/ an error appeares wrong number of arguments (0 for 1) error
<% form_for :picture, :html => { :multipart => true } do |form| %>
<p>
<label for="picture_first_name">First name::</label>
<%= form.text_field :first_name, :size => 20 %>
</p>
<p>
<label for="picture_last_name">Last name:</label>
<%= form.text_field :last_name, :size => 20 %>
</p>
<p>
<label for="picture_city">City:</label>
<%= form.select :city, Picture::CITIES, {}, :onchange => remote_function(:url => {:action => "update_universities"}, :with => "'picture[city]='+value") %>
</p>
<p>
<%= render :partial => 'universities' %>
</p>
<p>
<label for="picture_picture">Photo::</label>
<%= form.file_field :picture, :size => 20 %>
</p>
<%= submit_tag "Upload" %>
<% end %>
So, I have a render function, because i use AJAX to update the second select field.
<label for="picture_university">University:</label>
<%= form.select :university, [] %>
What is the problem with my app? Please help me to fix that!
ArgumentError in Upload#index
Showing app/views/upload/_universities.html.erb where line #2 raised:
wrong number of arguments (0 for 1)
Extracted source (around line #2):
1: University: 2: <%= form.select :university, [] %>
Trace of template inclusion: app/views/upload/index.html.erb
RAILS_ROOT: /home/user_admin/myapp Application Trace | Framework Trace | Full Trace
/home/user_admin/myapp/app/views/upload/_universities.html.erb:2:in
form' /home/user_admin/myapp/app/views/upload/_universities.html.erb:2:in
_run_erb_app47views47upload47_universities46html46erb_locals_object_universities' /home/user_admin/myapp/app/views/upload/index.html.erb:15:in_run_erb_app47views47upload47index46html46erb' /home/user_admin/myapp/app/views/upload/index.html.erb:1:in
_run_erb_app47views47upload47index46html46erb'