Class: MrMime::ImpersonationsController
Instance Method Summary
collapse
#current_impersonator, #impersonator?, #impersonator_id, included
Instance Method Details
#create ⇒ Object
5
6
7
8
9
10
11
|
# File 'app/controllers/mr_mime/impersonations_controller.rb', line 5
def create
if impersonation.save
redirect_to after_impersonation_url, notice: 'Impersonation started'
else
redirect_to :back, flash: { error: impersonation.error_messages }
end
end
|
#destroy ⇒ Object
13
14
15
16
17
|
# File 'app/controllers/mr_mime/impersonations_controller.rb', line 13
def destroy
impersonation.revert
redirect_to return_to_url, notice: 'Impersonation ended'
end
|