Class: CustomDeviseFailureApp

Inherits:
Devise::FailureApp
  • Object
show all
Defined in:
lib/generators/polivalente/templates/devise_failure_app.rb

Instance Method Summary collapse

Instance Method Details

#respondObject



2
3
4
5
6
7
8
# File 'lib/generators/polivalente/templates/devise_failure_app.rb', line 2

def respond
  if request_format == :turbo_stream
    redirect
  else
    super
  end
end

#skip_format?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/generators/polivalente/templates/devise_failure_app.rb', line 10

def skip_format?
  %w(html turbo_stream */*).include? request_format.to_s
end