forked from vaynermedia/discourse_user_directory
-
Notifications
You must be signed in to change notification settings - Fork 3
/
integrate.rb
28 lines (20 loc) · 669 Bytes
/
integrate.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
module Discourse
class << self
def top_menu_items_with_directory
@top_menu_items = top_menu_items_without_directory
unless @top_menu_items.include?(:directory)
@top_menu_items << :directory
end
@top_menu_items
end
alias_method_chain :top_menu_items, :directory
def anonymous_top_menu_items_with_directory
@anonymous_top_menu_items = anonymous_top_menu_items_without_directory
unless @anonymous_top_menu_items.include?(:directory)
@anonymous_top_menu_items << :directory
end
@anonymous_top_menu_items
end
alias_method_chain :anonymous_top_menu_items, :directory
end
end