Skip to content

Commit

Permalink
Merge pull request #46 from daveriess/master
Browse files Browse the repository at this point in the history
Eliminates appended '?' to redirects that have no query string
  • Loading branch information
Houdini committed Dec 29, 2014
2 parents 2e18e6c + 10e0ebb commit 9c71601
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -19,3 +19,5 @@ capybara-*.html
dump.rdb
*.ids
.rbenv-version
.ruby-gemset
.ruby-version
2 changes: 1 addition & 1 deletion lib/two_factor_authentication/controllers/helpers.rb
Expand Up @@ -21,7 +21,7 @@ def handle_two_factor_authentication

def handle_failed_second_factor(scope)
if request.format.present? and request.format.html?
session["#{scope}_return_to"] = "#{request.path}?#{request.query_string}" if request.get?
session["#{scope}_return_to"] = request.original_fullpath if request.get?
redirect_to two_factor_authentication_path_for(scope)
else
render nothing: true, status: :unauthorized
Expand Down

0 comments on commit 9c71601

Please sign in to comment.