Module: PrxAuth::Rails::AccountInfo
- Included in:
- Controller
- Defined in:
- lib/prx_auth/rails/ext/controller/account_info.rb
Constant Summary collapse
- PRX_ACCOUNT_MAPPING_SESSION_KEY =
"prx.auth.account.mapping".freeze
Instance Method Summary collapse
- #account_for(account_id) ⇒ Object
- #account_name_for(account_id) ⇒ Object
- #accounts_for(account_ids) ⇒ Object
Instance Method Details
#account_for(account_id) ⇒ Object
12 13 14 |
# File 'lib/prx_auth/rails/ext/controller/account_info.rb', line 12 def account_for(account_id) lookup_accounts([account_id]).first end |
#account_name_for(account_id) ⇒ Object
8 9 10 |
# File 'lib/prx_auth/rails/ext/controller/account_info.rb', line 8 def account_name_for(account_id) account_for(account_id).try(:[], "name") end |
#accounts_for(account_ids) ⇒ Object
16 17 18 |
# File 'lib/prx_auth/rails/ext/controller/account_info.rb', line 16 def accounts_for(account_ids) lookup_accounts(account_ids) end |