没有路由匹配[post]/sessions_contact/new&quot

发布于 2025-02-13 01:42:27 字数 1617 浏览 0 评论 0原文

你好吗?我希望您一切都好,我告诉您,我正在登录,以便用户可以输入并且该条目已注册,我已经有了Deanise Gem,但是我这样做是为了使客户(公司)可以登录,这是给我登录的公司用户的。

错误是以下: 没有路由匹配[post]“/sessions_contact/new”

我的路线是:

Rails.application.routes.draw do
 
  devise_for :users

  root to: 'pages#home'
    
  resources :admins
  resources :clients do
    resources :change_policies, only: %i[ index new create edit update destroy]
    resources :age_policies, only: %i[index new create edit update destroy]
    resources :refund_policies, only: %i[index new create edit update destroy]
    resources :reservation_policies, only: %i[index new create edit update destroy]
    resources :cancel_policies, only: %i[index new create edit update destroy]
    resources :rooms, only: %i[index new create edit update destroy]
    resources :contacts, only: %i[index new create edit update destroy]
    resources :reservations, only: %i[index new create edit update show destroy]    
  end

  resources :reservation, only: %i[index] do
    resources :item_reservations, only: %i[index new create edit update destroy]
    resources :user_reservations, only: %i[index new create edit update destroy]
    resources :other_reservations, only: %i[index new create edit update destroy]
    resources :obs_reservations, only: %i[index new create edit update destroy]
  end
 
  resources :registrations, only: %i[new create]
  resources :sessions_contact, only: %i[index new create destroy]
    
  # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end

我以前发布了一个类似的问题,他们建议我做一个新驱动程序,但我这样做了,但是如果您能帮助我,它仍然给我带来同样的问题

how are you? I hope you're doing well, I'm telling you, I'm doing a login so that users can enter and this entry is registered, I already have the Devise gem, but I do that so that the client (company) can log in, this is for users of the company I logged in.

the error is the following:
No route matches [POST] "/sessions_contact/new"

my routes are:

Rails.application.routes.draw do
 
  devise_for :users

  root to: 'pages#home'
    
  resources :admins
  resources :clients do
    resources :change_policies, only: %i[ index new create edit update destroy]
    resources :age_policies, only: %i[index new create edit update destroy]
    resources :refund_policies, only: %i[index new create edit update destroy]
    resources :reservation_policies, only: %i[index new create edit update destroy]
    resources :cancel_policies, only: %i[index new create edit update destroy]
    resources :rooms, only: %i[index new create edit update destroy]
    resources :contacts, only: %i[index new create edit update destroy]
    resources :reservations, only: %i[index new create edit update show destroy]    
  end

  resources :reservation, only: %i[index] do
    resources :item_reservations, only: %i[index new create edit update destroy]
    resources :user_reservations, only: %i[index new create edit update destroy]
    resources :other_reservations, only: %i[index new create edit update destroy]
    resources :obs_reservations, only: %i[index new create edit update destroy]
  end
 
  resources :registrations, only: %i[new create]
  resources :sessions_contact, only: %i[index new create destroy]
    
  # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end

I previously posted a similar problem and they advised me to make a new driver, which I did but it still gives me the same problem if you can help me Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文