Module: UserMenuHelper

Defined in:
app/helpers/user_menu_helper.rb

Instance Method Summary collapse

Instance Method Details



10
11
12
# File 'app/helpers/user_menu_helper.rb', line 10

def discussions_user_menu_link
  user_menu_link t(:discussions), discussions_user_path, 'discussions'
end


6
7
8
# File 'app/helpers/user_menu_helper.rb', line 6

def messages_user_menu_link
  user_menu_link t(:messages), messages_user_path, 'messages'
end


2
3
4
# File 'app/helpers/user_menu_helper.rb', line 2

def profile_user_menu_link
  user_menu_link t(:my_profile), user_path, 'show'
end


14
15
16
17
# File 'app/helpers/user_menu_helper.rb', line 14

def user_menu_link(label, path, active_on)
  link_klass = 'active' if action_name == active_on
  link_to label, path, { class: link_klass }.compact
end