Module: QuickLinkHelper
- Included in:
- ActionView::Base
- Defined in:
- app/helpers/quick_link_helper.rb
Overview
On Pages, the main text is parsed for expressions like β[[Foo Bar]]β. These expressions generate links to β/search/guess?query=Foo+Barβ. The SearchController handles the redirection to the requested content.
This can be used to insert quick links to user, pages and other types of content.
Instance Method Summary collapse
Instance Method Details
#replace_quick_link_tags(text) ⇒ Object
11 12 13 |
# File 'app/helpers/quick_link_helper.rb', line 11 def (text) text.gsub(/\[\[.*\]\]/) { |query| link_tag_from_search_query(query.gsub('[', '').gsub(']', '')) } if text.present? end |