2012-10-08 4 views
3

레일스를 처음 사용했습니다. 최신 Devise gem을 설치했으며이 오류가 발생합니다.Devits/registrations의 ArgumentError # 새로운 잘못된 인수 수

ArgumentError in Devise/registrations#new 

Showing /Users/Malone/Sites/todos/app/views/devise/registrations/new.html.erb where line #3 raised: 
Wrong number of arguments (3 for 2) 
Extracted source (around line #3): 
1: <h2>Sign up</h2> 
2: 
3: <%= form_for(resource_name, resource,: URL => registration_path(resource_name)) do |f| %> 
4: <%= f.error_messages %> 
5: <p><%= f.label: email %></p> 
6: <p><%= f.text_field: email %></p> 

나를 도와 줄 수있는 정보가 확실하지 않습니다. 하지만 알려주세요.

답변

0

변경

<%= form_for(resource_name, resource, :url => registration_path(resource_name)) do |f| %> 

문제는이 일이

<h2>Sign up</h2> 
    <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> 
    <%= f.error_messages %> 
    <p><%= f.label: email %></p> 
    <p><%= f.text_field: email %></p> 
    .... 
    .... 
    <% end %> 
+0

을 시도 해결하기위한

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> 

0

을 위하여! 감사!
관련 문제