Module: Thredded::NavHelper
- Included in:
- ApplicationHelper
- Defined in:
- app/helpers/thredded/nav_helper.rb
Constant Summary collapse
- USER_NAV_MODERATION_PAGES =
Set.new( %w[ thredded--pending-moderation thredded--moderation-activity thredded--moderation-history thredded--moderation-users thredded--moderation-user ] )
- USER_NAV_PREFERENCES_PAGES =
Set.new( %w[ thredded--preferences ] )
- USER_NAV_PRIVATE_TOPICS_PAGES =
Set.new( %w[ thredded--new-private-topic thredded--private-topics-index thredded--private-topic-show ] )
Instance Method Summary collapse
- #current_page_moderation? ⇒ Boolean
- #current_page_preferences? ⇒ Boolean
- #current_page_private_topics? ⇒ Boolean
Instance Method Details
#current_page_moderation? ⇒ Boolean
34 35 36 |
# File 'app/helpers/thredded/nav_helper.rb', line 34 def current_page_moderation? USER_NAV_MODERATION_PAGES.include?(content_for(:thredded_page_id)) end |
#current_page_preferences? ⇒ Boolean
30 31 32 |
# File 'app/helpers/thredded/nav_helper.rb', line 30 def current_page_preferences? USER_NAV_PREFERENCES_PAGES.include?(content_for(:thredded_page_id)) end |
#current_page_private_topics? ⇒ Boolean
38 39 40 |
# File 'app/helpers/thredded/nav_helper.rb', line 38 def current_page_private_topics? USER_NAV_PRIVATE_TOPICS_PAGES.include?(content_for(:thredded_page_id)) end |