Module: Teamable::Controllers::CurrentAccountHelper

Extended by:
ActiveSupport::Concern
Defined in:
lib/teamable/controllers/current_account_helper.rb

Instance Method Summary collapse

Instance Method Details

#account_selected?Boolean

Check if a team has been selected

Returns:

  • (Boolean)


37
38
39
# File 'lib/teamable/controllers/current_account_helper.rb', line 37

def 
  !!
end

#authenticate_account!Object

Raise Teamable::MissingAccountError unless account_selected? is true.



24
25
26
27
28
29
# File 'lib/teamable/controllers/current_account_helper.rb', line 24

def authenticate_account!
  return unless user_signed_in?
  return if teamable_controller?

  raise Teamable::MissingAccountError unless 
end

#current_accountObject

Access current team.



32
33
34
# File 'lib/teamable/controllers/current_account_helper.rb', line 32

def 
  @current_account ||= Teamable::Current.
end