You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any thoughts on how to enable searching for private topics? Ideally I'd like a search to return results from private_topics when you're within private_topics#index or private_topics#show.
I've added a #search method to my PrivateTopicsController via a decorator, but am unsure how to best mark up the search form in the nav header based upon the controller context.
The text was updated successfully, but these errors were encountered:
@lawso017 great question. If you're looking to conditionally include a private topic search instead of a default, regular-topic, search I would start in app/views/thredded/shared/_nav.html.erb and maybe create a predicate method in the helper that returns which context you're currently in. Maybe something like in_private_topics?? Eg:
<%= render 'thredded/private_search/form',
messageboard: messageboard_or_nil if in_private_topics? %>
Any thoughts on how to enable searching for private topics? Ideally I'd like a search to return results from private_topics when you're within private_topics#index or private_topics#show.
I've added a #search method to my PrivateTopicsController via a decorator, but am unsure how to best mark up the search form in the nav header based upon the controller context.
The text was updated successfully, but these errors were encountered: