-
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use form_with, require email format in example, handle Rails 7 (turbo…
…) form redirect (#128)
- Loading branch information
Showing
4 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<%= form_for @session, url: send(Passwordless.mounted_as).sign_in_path do |f| %> | ||
<%= form_with model: @session, url: send(Passwordless.mounted_as).sign_in_path, data: { turbo: 'false' } do |f| %> | ||
<% email_field_name = :"passwordless[#{@email_field}]" %> | ||
<%= text_field_tag email_field_name, params.fetch(email_field_name, nil) %> | ||
<%= text_field_tag email_field_name, params.fetch(email_field_name, nil), required: true %> | ||
<%= f.submit I18n.t('passwordless.sessions.new.submit') %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters