index.erb.html 파일에 양식이 있습니다. (업로드 컨트롤러). 내가 localhost를 호출 할 때 은 : 3000/업로드 내가 두 번째 선택 필드를 업데이트하는 AJAX를 사용하기 때문에/오류가, 내가 렌더링 기능을 가지고, 그래서 인수의 잘못된 번호 (1 0) 오류잘못된 인수 개수 (1에 대해 0)
<% 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 %>
을 appeares.
<label for="picture_university">University:</label>
<%= form.select :university, [] %>
내 응용 프로그램의 문제점은 무엇입니까? 저를 고치는 것을 도와주세요! 업로드 # 지수
오류 ArgumentError
라인 # 2가 제기 응용 프로그램 /보기/업로드/_universities.html.erb 보기 :
인수 잘못된 번호 (0 1)을
추출 소스 (주위 선 # 2)
1 대학 : 2 <% = form.select : 보편 의 sity, [] %>
템플릿 포함의 추적 : 응용 프로그램 /보기/업로드/index.html.erb
RAILS_ROOT :/홈/user_admin/MyApp를 응용 프로그램 추적 | 프레임 워크 추적 | 전체 추적
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 /home/user_admin/myapp/app/views/upload/_universities.html.erb:2:in .erb : 15 :_run_erb_app47views47upload47index46html46erb' /home/user_admin/myapp/app/views/upload/index.html.erb:1:in
_run_erb_app47views47upload47index46html46erb '
내가보기에 'form'변수는'university' 뷰에서 알 수 없지만 다른 오류가 발생합니다. 자세한 오류 추적을 제공해야합니다. – Koraktor
Koraktor, 제발 도와주세요. 방금 전체 오류 추적을 추가했습니다. – Anton