Skip to content

Commit

Permalink
change redirect option after domain creation
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Mar 15, 2024
1 parent d3db46b commit 0b39307
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/controllers/registrant/domains_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ def create
if @invoice
flash.now[:notice] = t('.success')

render turbo_stream: [
turbo_stream.append('flash', partial: 'layouts/flash'),
turbo_stream.append('payment_method', partial: 'registrant/domains/payment_form',
locals: { invoice: @invoice})
]
# redirect_to registrant_pending_action_path(pending), status: :see_other

redirect_to registrant_domains_path, status: :see_other

# render turbo_stream: [
# turbo_stream.append('flash', partial: 'layouts/flash'),
# turbo_stream.append('payment_method', partial: 'registrant/domains/payment_form',
# locals: { invoice: @invoice})
# ]
else
flash[:alert] = @invoice.errors.full_messages
render turbo_stream: turbo_stream.replace('flash', partial: 'layouts/flash')
Expand Down

0 comments on commit 0b39307

Please sign in to comment.