Руслан Корнев

Joined

230 Experience
2 Lessons Completed
0 Questions Solved

Activity

Posted in How to use Devise with Hotwire & Turbo.js Discussion

Correct me if i'm wrong but the one of disadvantages of this method is that on new session page if user typed wrong email and submits the form the email will not be preserved due to this lines:

    if request_format == :turbo_stream
      redirect

I found more appropriate solution for me how to fix this.

  1. do not override respond method.
  2. add data-turbo="false" attribute to sign in form (which you should copy in advance)

Check this commit for this new feature:

https://github.com/hotwired/turbo/commit/ea00632e9790a680c7704d90101403f34d9433a6#diff-38acdd502c97ee1a1140d761a08c7e07e46c9f266b4efd0c55d0d5b986517158R40

Posted in How to use Devise with Hotwire & Turbo.js Discussion

Hi Chris, seems you forgot to include the line about config.navigational_formats in the snippet which was shown in the screencast

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.