Class: Marty::AuthApp
- Inherits:
-
SimpleApp
- Object
- Netzke::Base
- SimpleApp
- Marty::AuthApp
- Defined in:
- app/components/marty/auth_app.rb
Overview
Basic Marty single-page application with authentication.
Extending Marty::AuthApp
DOCFIX
Direct Known Subclasses
Instance Method Summary collapse
-
#menu ⇒ Object
Set the Logout button if current_user is set.
- #user_menu ⇒ Object
Methods inherited from SimpleApp
#configure, #js_component_html, #js_component_render, #main_panel_config, #menu_bar_config, #status_bar_config
Methods inherited from Netzke::Base
Instance Method Details
#menu ⇒ Object
Set the Logout button if current_user is set
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/components/marty/auth_app.rb', line 11 def [].tap do || user = Mcfly.whodunnit if !user.nil? << "->" << { text: user.name, tooltip: 'Current user', menu: , name: "sign_out", } else << "->" << :sign_in end end end |
#user_menu ⇒ Object
27 28 29 |
# File 'app/components/marty/auth_app.rb', line 27 def [:sign_out] end |