Standardize links to wiki help pages.
* Fix inconsistencies in how wiki pages were linked. * Link directly to the wiki instead of to a title search that is expected to redirect to the wiki.
This commit is contained in:
@@ -103,9 +103,13 @@ module ApplicationHelper
|
||||
link_to search, posts_path(tags: search)
|
||||
end
|
||||
|
||||
def link_to_wiki(*wiki_titles, **options)
|
||||
def link_to_wiki(text, title)
|
||||
link_to text, wiki_page_path(title)
|
||||
end
|
||||
|
||||
def link_to_wikis(*wiki_titles, last_word_connector: ", or", **options)
|
||||
links = wiki_titles.map do |title|
|
||||
link_to title.tr("_", " "), wiki_pages_path(title: title)
|
||||
link_to title.tr("_", " "), wiki_page_path(title)
|
||||
end
|
||||
|
||||
to_sentence(links, **options)
|
||||
|
||||
Reference in New Issue
Block a user