Эй, я столкнулся с проблемой, которая появляется, когда я пытаюсь войти в систему, используя Devise и Simple_Form после http://localhost:3000/account/sign_in
, он перенаправляет меня на http://localhost:3000/session.account
, где всплывающая ошибка: Нет маршрута соответствует [POST] "/session.account". Есть идеи почему? И как вернуть его в рабочее состояние?
rout.rb
Rails.application.routes.draw do
get 'tasks/completed', to: 'tasks#completed'
get 'tasks/pending', to: 'tasks#pending'
namespace :settings do
resources :tags
resources :categories
end
resources :settings
resources :tasks
devise_for :account
devise_scope :account do
get 'removal', to: 'devise/registrations#cancel'
end
devise_scope :user do
delete 'session', to: 'devise/sessions#destroy'
end
root to: 'dashboards#index'
end
Рейк-маршруты
removal GET /removal(.:format) devise/registrations#cancel
session DELETE /session(.:format) devise/sessions#destroy
new_account_session GET /account/sign_in(.:format) devise/sessions#new
account_session POST /account/sign_in(.:format) devise/sessions#create
destroy_account_session DELETE /account/sign_out(.:format) devise/sessions#destroy
new_account_password GET /account/password/new(.:format) devise/passwords#new
edit_account_password GET /account/password/edit(.:format) devise/passwords#edit
account_password PATCH /account/password(.:format) devise/passwords#update
PUT /account/password(.:format) devise/passwords#update
POST /account/password(.:format) devise/passwords#create
cancel_account_registration GET /account/cancel(.:format) devise/registrations#cancel
new_account_registration GET /account/sign_up(.:format) devise/registrations#new
edit_account_registration GET /account/edit(.:format) devise/registrations#edit
account_registration PATCH /account(.:format) devise/registrations#update
PUT /account(.:format) devise/registrations#update
DELETE /account(.:format) devise/registrations#destroy
POST /account(.:format) devise/registrations#create root GET /
views / devise / session / new
<h2>Log in</h2>
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="form-inputs">
<%= f.input :email,
required: false,
autofocus: true,
input_html: { autocomplete: "email" } %>
<%= f.input :password,
required: false,
input_html: { autocomplete: "current-password" } %>
<%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
</div>
<div class="form-actions">
<%= f.button :submit, "Log in" %>
</div>
<% end %>
<%= render "devise/shared/links" %>