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.

Author:

Instance Method Summary collapse

Instance Method Details

#accountArkaan::Account

Gets the account linked to the current session.

Returns:

  • (Arkaan::Account)

    the account linked to the current session.



10
11
12
# File 'lib/virtuatable/helpers/accounts.rb', line 10

def 
  !respond_to?(:session) || session.nil? ? nil : session.
end

#account!Object



14
15
16
# File 'lib/virtuatable/helpers/accounts.rb', line 14

def account!
  api_bad_request 'session_id.required' if .nil?
end