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

Missing config.reset_password_mailer when running from master #137

Closed
bzf opened this issue Jul 18, 2018 · 5 comments
Closed

Missing config.reset_password_mailer when running from master #137

bzf opened this issue Jul 18, 2018 · 5 comments

Comments

@bzf
Copy link
Contributor

bzf commented Jul 18, 2018

When I'm trying to run our application using the master branch rather than the version (0.12.0) from Rubygems our app crashes with the error:

To use reset_password submodule, you must define a mailer (config.reset_password_mailer = YourMailerClass).

I've bisected it between 0.12.0..master and landed on this this commit.

Please ask if there's anything you need to know or if there's anything I could do to help figure this out. 😃

EDIT:
We're using Ruby 2.4.4 and Rails 5.0.7.

@Ch4s3
Copy link
Contributor

Ch4s3 commented Jul 18, 2018

Interesting. Sending the include to ActionController shouldn't break the reset_password submodule... @andrewhood125 or @athix do you have any thoughts?

@joshbuker
Copy link
Member

@Ch4s3 we're sending everything into the module instead of the Base class that ApplicationController typically inherits. We'll want to update that code to instead inject into ActionController::Base and ActionController::API individually, depending on their load status (or just send regardless if it doesn't force unnecessary loading of the Base class).

@denniscastro
Copy link

denniscastro commented Oct 19, 2018

Reopen it!.

In controllers is all ok, the helpers are injected, but the model doesnt it and get the same error.

ArgumentError: To use reset_password submodule, you must define a mailer (config.reset_password_mailer = YourMailerClass)

and fix including this line in User model.

include Sorcery::Controller

@joshbuker joshbuker reopened this Oct 19, 2018
@denniscastro
Copy link

Hi.

It is fixed now, with the edge version

@joshbuker
Copy link
Member

Ah, yeah this is the issue I fixed on #159. Closing this out again.

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

4 participants