Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use form_with, requre email, handle rails 7 form redirect #128

Merged
merged 8 commits into from
Nov 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add data turbo false to ensure redirect in rails 7
  • Loading branch information
yshmarov committed Nov 9, 2022
commit 1b8fc6f75f1f5a83bd6a8a2f547965bc22b802ce
2 changes: 1 addition & 1 deletion app/views/passwordless/sessions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= form_with, model: @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), required: true %>
<%= f.submit I18n.t('passwordless.sessions.new.submit') %>
Expand Down