2012-10-16 155 views
1

美好的一天! 我正在執行一個邪惡的寶石...並得到路由錯誤。寶石邪惡的路線

no route matches [POST] "/user_signup/address" 

雖然我的路線

resources :users 
    resources :user_signup 

控制器

class UserSignupController < ApplicationController 
    include Wicked::Wizard 
    steps :address, :company_info, :sum_up 

,當我嘗試提交表單地址:

p address 
= form_for @user, url: wizard_path do |f| 
    p 
    = f.label :address 
    = f.text_field :address 
    p 
    = f.submit 'Continue' 
= link_to 'Skip', next_wizard_path 

我得到這個錯誤

回答

2

傻我。改爲

= form_for @user, url: wizard_path, :method => :put do |f| 

method: :put沒有工作,沒關係!