I'm using Hotwire and devise User on a Rails 6.0.3.6 app.
I add this broadcast for Users
class User
after_create_commit { broadcast_append_to 'users' }
end
Then when a User is created it goes through his partial (users/user) where I am trying to use current_user
Devise helper.
But Rails throw this error:
Devise::MissingWarden in Players::Registrations#update
Devise could not find the `Warden::Proxy` instance on your request environment.
Make sure that your application is loading Devise and Warden as expected and that the `Warden::Manager` middleware is present in your middleware stack.
Maybe the solution would be to be able to tell Rails the following:
If from a model, you are trying to render his default partial (.to_partial_path) you need to pass it some locals variables,like user: self
.
How could I say that to Rails ?
Thanks for you help
DHH said:
https://discuss.hotwire.dev/t/authentication-and-devise-with-broadcasts/1752/4