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を導入し、新規登録画面へ遷移するためのpath

Posted at

image.png
1:deviseを導入し、新規登録ボタンをクリックしたら、新規登録画面へ遷移するための設定。
<%= form_with model: @user, url: user_registration_path, class: 'registration-main', local: true do |f| %>
と記述する。
rails routesコマンドを実行し、pathの確認をすると
image.png
今回、フォームからの新規登録情報を送信して、registrations#createを実行し、保存したいため、Prefix:user_registrationをpathとして、registrations/new.html.erbのurlにuser_registration_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?