Module: Teamable::Controllers::CurrentAccountHelper
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/teamable/controllers/current_account_helper.rb
Instance Method Summary collapse
-
#account_selected? ⇒ Boolean
Check if a team has been selected.
-
#authenticate_account! ⇒ Object
Raise Teamable::MissingAccountError unless account_selected? is true.
-
#current_account ⇒ Object
Access current team.
Instance Method Details
#account_selected? ⇒ Boolean
Check if a team has been selected
37 38 39 |
# File 'lib/teamable/controllers/current_account_helper.rb', line 37 def account_selected? !!current_account 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 account_selected? end |