Module: Virtuatable::Helpers::Accounts
- Included in:
- Controllers::Base
- Defined in:
- lib/virtuatable/helpers/accounts.rb
Overview
These helpers provide methods used to get and check accounts.
Instance Method Summary collapse
-
#account ⇒ Arkaan::Account
Gets the account linked to the current session.
- #account! ⇒ Object
Instance Method Details
#account ⇒ Arkaan::Account
Gets the account linked to the current session.
10 11 12 |
# File 'lib/virtuatable/helpers/accounts.rb', line 10 def account !respond_to?(:session) || session.nil? ? nil : session.account end |
#account! ⇒ Object
14 15 16 |
# File 'lib/virtuatable/helpers/accounts.rb', line 14 def account! api_bad_request 'session_id.required' if account.nil? end |