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

bugfix: 'authenticate'(/'login') should work with auth_use_referrer #26

Merged
merged 3 commits into from
Apr 28, 2015

Conversation

jf
Copy link
Contributor

@jf jf commented Apr 18, 2015

authenticate/login doesn't currently respect the auth_use_referrer setting now. With this patch, things become a little bit more automatic, instead of having to manually set things up.

get :blah do
    if !current_user
        session[:return_to] = url(CONTROLLER, :blah)
        redirect url(:sessions, :login)
    end
    ...
end

jf added 2 commits April 19, 2015 06:02
…ving via

'login'/'authenticate' protection on an action, don't redirect after back to
any previously saved session[:return_to]/action
Quintasan added a commit that referenced this pull request Apr 28, 2015
bugfix: 'authenticate'(/'login') should work with auth_use_referrer
@Quintasan Quintasan merged commit 00c0d66 into jondot:master Apr 28, 2015
@Quintasan
Copy link
Collaborator

@jf Thanks for your contribution

@jf
Copy link
Contributor Author

jf commented Apr 29, 2015

Sure. Thanks for taking a look!

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

Successfully merging this pull request may close these issues.

2 participants