Skip to content

Instantly share code, notes, and snippets.

@rwehresmann
Created August 23, 2019 03:12
Show Gist options
  • Select an option

  • Save rwehresmann/218871bde04d695c749791e6750d25a2 to your computer and use it in GitHub Desktop.

Select an option

Save rwehresmann/218871bde04d695c749791e6750d25a2 to your computer and use it in GitHub Desktop.
module Admin
class UsersController < Admin::ApplicationController
def login_as_user
@user = User.find(params[:id])
session[:user_id] = @user.id
redirect_to root_path
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment