Skip to content

Commit

Permalink
Fix registration spec using turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Oct 11, 2024
1 parent 32b2f4e commit bbd4001
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/account_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ def password_authentication(username, password)
# correct password
if not user.active?
account_inactive(user, flash_now: true)
render status: :unprocessable_entity
elsif user.force_password_change
return if redirect_if_password_change_not_allowed(user)

Expand Down
6 changes: 5 additions & 1 deletion app/views/account/_register.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<div class="modal-delivery-element">
<%= labelled_tabular_form_for(@user, url: account_register_path, html: { class: 'form -wide-labels spot-modal' }) do |f| %>
<%= labelled_tabular_form_for(
@user,
url: account_register_path,
data: { turbo: false },
html: { class: 'form -wide-labels spot-modal' }) do |f| %>
<%= back_url_hidden_field_tag use_referer: false %>
<%= error_messages_for :user %>
<div id="spotModalTitle" class="spot-modal--header">
Expand Down

0 comments on commit bbd4001

Please sign in to comment.