Skip to content

Commit

Permalink
Avoid http redirects, they will be cached on some browsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
martini committed Jan 26, 2016
1 parent 7d6ab22 commit 301688a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions app/controllers/sessions_controller.rb
Expand Up @@ -212,7 +212,12 @@ def switch_to_user
# set session user
current_user_set(user)

redirect_to '/#'
render(
json: {
success: true,
location: '',
},
)
end

# "switch" back to user
Expand Down Expand Up @@ -245,7 +250,12 @@ def switch_back_to_user
# log end session
current_session_user.activity_stream_log('ended switch to', user.id, true)

redirect_to '/#'
render(
json: {
success: true,
location: '',
},
)
end

def list
Expand Down

0 comments on commit 301688a

Please sign in to comment.