2012-08-14 55 views
0

我剛開始使用設計,我修改會議#new.html.erb文件,以適應我的需要。我創建了一個名爲註冊具有遵循設計路線錯誤

<%= link_to "REGISTER", "new_customer_registration_path" %> 

鏈接然而,當我點擊它指引我到一個沒有路線錯誤

Routing Error 
No route matches [GET] "/customers/new_customer_registration_path" 

這裏我耙路線

 new_customer_session GET /customers/sign_in(.:format)   devise/sessions#new 
      customer_session POST /customers/sign_in(.:format)   devise/sessions#create 
    destroy_customer_session DELETE /customers/sign_out(.:format)  devise/sessions#destroy 
      customer_password POST /customers/password(.:format)  devise/passwords#create 
     new_customer_password GET /customers/password/new(.:format) devise/passwords#new 
     edit_customer_password GET /customers/password/edit(.:format) devise/passwords#edit 
          PUT /customers/password(.:format)  devise/passwords#update 
cancel_customer_registration GET /customers/cancel(.:format)   devise/registrations#cancel 
     customer_registration POST /customers(.:format)     devise/registrations#create 
    new_customer_registration GET /customers/sign_up(.:format)   devise/registrations#new 
    edit_customer_registration GET /customers/edit(.:format)   devise/registrations#edit 
          PUT /customers(.:format)     devise/registrations#update 
          DELETE /customers(.:format)     devise/registrations#destroy 
         events GET /events(.:format)     events#index 
          POST /events(.:format)     events#create 
        new_event GET /events/new(.:format)    events#new 
        edit_event GET /events/:id/edit(.:format)   events#edit 
         event GET /events/:id(.:format)    events#show 
          PUT /events/:id(.:format)    events#update 
          DELETE /events/:id(.:format)    events#destroy 
         root  /         events#index 

我的路線他的文件已經跟着

devise_for :customers 
    resources :events 
    root :to => 'events#index' 
    match '/new_customer_registration' => "devise/registrations#new" 

我得到重定向到發生錯誤的頁面。

http://localhost:3000/customers/new_customer_registration_path 

我該如何使用它?預先感謝

回答

0

它不應該是一個字符串,但方法

<%= link_to "REGISTER", new_customer_registration_path %> 
+0

LMAO,笑很抱歉,看着這麼久代碼的美麗和超過想象。非常感謝你!一旦我被允許,我會讓它接受 – Jseb 2012-08-14 19:30:40