0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

devise導入し、ログインのパスの記述

Posted at

image.png
1:deviseを導入し、ログインボタンをクリックしたら、ログイン画面へ遷移するための設定。
<%= form_with model: @user, url: user_session_path, class: 'registration-main', local: true do |f| %>
と記述する。
rails routesコマンドを実行し、pathの確認をすると
image.png
今回、フォームからのログイン情報を送信して、sessions#createを実行し、保存したいため、Prefix:user_sessionをpathとして、sessions/new.html.erbのurlにuser_session_pathを記載することでログイン情報を保存できる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?