Module: UserMenuHelper
- Defined in:
- app/helpers/user_menu_helper.rb
Instance Method Summary collapse
- #discussions_user_menu_link ⇒ Object
- #messages_user_menu_link ⇒ Object
- #profile_user_menu_link ⇒ Object
- #user_menu_link(label, path, active_on) ⇒ Object
Instance Method Details
#discussions_user_menu_link ⇒ Object
10 11 12 |
# File 'app/helpers/user_menu_helper.rb', line 10 def t(:discussions), discussions_user_path, 'discussions' end |
#messages_user_menu_link ⇒ Object
6 7 8 |
# File 'app/helpers/user_menu_helper.rb', line 6 def t(:messages), , 'messages' end |
#profile_user_menu_link ⇒ Object
2 3 4 |
# File 'app/helpers/user_menu_helper.rb', line 2 def t(:my_profile), user_path, 'show' end |
#user_menu_link(label, path, active_on) ⇒ Object
14 15 16 17 |
# File 'app/helpers/user_menu_helper.rb', line 14 def (label, path, active_on) link_klass = 'active' if action_name == active_on link_to label, path, { class: link_klass }.compact end |