-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
default_confirm_success_url fails in initializer #223
Comments
Probably not the way its supposed to be but does public
def default_confirm_success_url
"http://localhost:3000"
end help? |
Yeah could override but I'd rather the initializer function correctly to prevent confusion in the future. |
@hiattp How did you override that? |
@gabrielhilal We ended up overriding most of the controllers that come with this gem entirely so didn't need to override that particular setting. |
After updating to version |
Seems like a similar issue: Using 0.1.39 I'm hitting a 422 return value because there's no confirm_success_url defined. Pry output:
I've overridden the controller in order to break into the debugger in the This is occurring in a Request spec that looks like: describe 'POST /api/model_auth (Sign Up process)', focus: :true do
it 'Should respond with status 200(OK)' do
post model_registration_path(email: '[email protected]', password: 'qwertyuiop', password_confirmation: 'qwertyuiop')
expect(response).to have_http_status(200)
end
it 'Should add a new model' do
expect do
post model_registration_path(email: '[email protected]', password: 'qwertyuiop')
end.to change(model, :count).by(1)
end
end Any ideas? Shouldn't the |
I added the following to my DeviseTokenAuth.setup do |config|
config.default_confirm_success_url = "http://localhost"
end But this isn't very nice just to support a test. Should my Angular Javascript front end be passing this value as a parameter? Will this happen by default if I'm using |
seem like doesnt work in me i change the the url but still dont work, do i need to update my gem ? |
@jomarbarnobal you might want to try out my fork of this project. It contains the Pull Request that I think fixes this problem. If you find it helps, you could help apply a little pressure to one of the maintainers to merge my PR! ;-) |
I made it work!. thanks a lot for you response. |
Or you can just do:
|
@stephanebruckert
|
Closing as it seems old, @luannguyenkhoa it seems another error, free feel to open a new issue! |
When I try to set this in the init I get:
The text was updated successfully, but these errors were encountered: