Skip to content
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

NoMethodError in Users::SessionsController#create #9

Open
secretpray opened this issue Aug 17, 2023 · 1 comment
Open

NoMethodError in Users::SessionsController#create #9

secretpray opened this issue Aug 17, 2023 · 1 comment

Comments

@secretpray
Copy link

After creating a project for the first time (step 28), I always get the following error at the registration or user login stage:
(login)

Снимок экрана 2023-08-17 в 08 54 04

(sign_up)

Снимок экрана 2023-08-17 в 08 45 15

Can't find the empty method?
The user is created, but I can't log in to the account, some callback is preventing me.
Avatar responds to the command attached? -> true

@secretpray
Copy link
Author

To avoid the error, you need to edit the file: 'config/initializers/devise.rb'
Remove:
(3-15)

class TurboFailureApp < Devise::FailureApp
  def respond
    if request_format == :turbo_stream
      redirect
    else
      super
    end
  end

  def skip_format?
    %w[html turbo_stream */*].include? request_format.to_s
  end
end

(34)

config.parent_controller = 'TurboDeviseController' 

(46-50)

  config.warden do |manager|
    manager.failure_app = TurboFailureApp
    #   manager.intercept_401 = false
    #   manager.default_strategies(scope: :user).unshift :some_external_strategy
  end 

Add this lines!

 config.responder.error_status = :unprocessable_entity
 config.responder.redirect_status = :see_other

My version devise:

  • devise (4.9.2)

Devise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant