Class: UserTemplates::MenuController
- Inherits:
-
Volt::ModelController
- Object
- Volt::ModelController
- UserTemplates::MenuController
- Defined in:
- app/user_templates/controllers/menu_controller.rb
Instance Method Summary collapse
Instance Method Details
#is_active? ⇒ Boolean
14 15 16 |
# File 'app/user_templates/controllers/menu_controller.rb', line 14 def is_active? url.path.split('/')[1] == 'login' end |
#show_name ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'app/user_templates/controllers/menu_controller.rb', line 3 def show_name Volt.current_user.then do |user| # Make sure there is a user if user user._name || user._email || user._username else '' end end end |