Class: IamController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- IamController
- Defined in:
- app/controllers/iam_controller.rb
Instance Method Summary collapse
Instance Method Details
#log_in_as ⇒ Object
2 3 4 5 6 7 8 |
# File 'app/controllers/iam_controller.rb', line 2 def log_in_as account = Iam::Configuration.account_class.constantize.find(params[:id]) sign_in Iam::Configuration.account_class.downcase, account name = Iam::Configuration.account_attributes.map{ |key| account.public_send(key)}.join(' ') render json: { notice: I18n.t('iam.success', name: name) } end |