-
Notifications
You must be signed in to change notification settings - Fork 328
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
Devise FailureApp can't include Turbo::Native::Navigation anymore #507
Comments
@arusa The concern is intended to extend If the maintainers are interested in that kind of broader support, a PR that guarded https://github.com/hotwired/turbo-rails/blob/main/app/controllers/turbo/native/navigation.rb#L10 with a |
Sounds like an easy solution. If it's intended to extend Maybe the method |
A temporary solution is to define a class TurboFailureApp < Devise::FailureApp
# Compatibility for Turbo::Native::Navigation
class << self
def helper_method(name)
end
end
include Turbo::Native::Navigation
# Turbo Native requests that require authentication should return 401s to trigger the login modal
def http_auth?
turbo_native_app? || super
end
end |
As learned from @joemasilotti, I was including
Turbo::Native::Navigation
in my Devise FailureApp, so I could use the methodturbo_native_app?
there.Since v1.5.0 that doesn't work anymore, because Turbo::Native::Navigation uses
helper_method
, which is not available in Devise::FailureApp:turbo-rails/app/controllers/turbo/native/navigation.rb
Line 10 in 097d8f9
This is not a big issue, as I can easily duplicate the
turbo_native_app?
method.But I wonder if this is intended, or if classes, that don't know about helpers, should still be able to
include Turbo::Native::Navigation
.The text was updated successfully, but these errors were encountered: