1

我安装了 devise_invitable gem 并获得了一个工作视图(用户/邀请/新),我可以在其中向某些电子邮件发送邀请。一旦我点击“发送邀请”按钮。我被重定向到 /invitations/user 并出现路由错误“没有路由匹配 [POST]”/invitations/user”。如果有人知道为什么 gem 重定向到这个未定义的新路由,我将不胜感激。我错过了一步吗在安装中?以下是我当前的 rake 路线信息:

root        /                                      landing#index
           landing_index GET    /landing/index(.:format)               landing#index
        new_user_session GET    /users/sign_in(.:format)               devise/sessions#new
            user_session POST   /users/sign_in(.:format)               devise/sessions#create
    destroy_user_session DELETE /users/sign_out(.:format)              devise/sessions#destroy
  user_omniauth_callback        /users/auth/:action/callback(.:format) devise/omniauth_callbacks#(?-mix:(?!))
cancel_user_registration GET    /users/cancel(.:format)                registrations#cancel
       user_registration POST   /users(.:format)                       registrations#create
   new_user_registration GET    /users/sign_up(.:format)               registrations#new
  edit_user_registration GET    /users/edit(.:format)                  registrations#edit
                         PUT    /users(.:format)                       registrations#update
                         DELETE /users(.:format)                       registrations#destroy
             user_unlock POST   /users/unlock(.:format)                devise/unlocks#create
         new_user_unlock GET    /users/unlock/new(.:format)            devise/unlocks#new
                         GET    /users/unlock(.:format)                devise/unlocks#show
  accept_user_invitation GET    /users/invitation/accept(.:format)     devise/invitations#edit
         user_invitation POST   /users/invitation(.:format)            devise/invitations#create
     new_user_invitation GET    /users/invitation/new(.:format)        devise/invitations#new
                         PUT    /users/invitation(.:format)            devise/invitations#update
                   posts GET    /posts(.:format)                       posts#index
                         POST   /posts(.:format)                       posts#create
                new_post GET    /posts/new(.:format)                   posts#new
               edit_post GET    /posts/:id/edit(.:format)              posts#edit
                    post GET    /posts/:id(.:format)                   posts#show
                         PUT    /posts/:id(.:format)                   posts#update
                         DELETE /posts/:id(.:format)                   posts#destroy
                profiles GET    /profiles(.:format)                    profiles#index
                         POST   /profiles(.:format)                    profiles#create
             new_profile GET    /profiles/new(.:format)                profiles#new
            edit_profile GET    /profiles/:id/edit(.:format)           profiles#edit
                 profile GET    /profiles/:id(.:format)                profiles#show
                         PUT    /profiles/:id(.:format)                profiles#update
                         DELETE /profiles/:id(.:format)                profiles#destroy
4

0 回答 0