Created
September 17, 2015 18:24
-
-
Save dimroc/6e698f7edf3388cd016c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Admin::ImpersonationsController < AdminController | |
| respond_to :html | |
| def update | |
| current_user.update_attributes(impersonating_params) | |
| respond_with current_user, location: admin_organizations_path | |
| end | |
| def destroy | |
| current_user.update_attributes(impersonating_id: nil) | |
| respond_with current_user, location: admin_users_path | |
| end | |
| private | |
| def impersonating_params | |
| params[:user].permit(:impersonating_id) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment