Module: ApiGuides::ViewHelper
- Defined in:
- lib/api_guides/view_helper.rb
Instance Method Summary collapse
-
#anchorize(text) ⇒ Object
AKA permalink.
Instance Method Details
#anchorize(text) ⇒ Object
AKA permalink
6 7 8 |
# File 'lib/api_guides/view_helper.rb', line 6 def anchorize(text) text.gsub(/[^\w-]/, ' ').gsub(/\s+/, '-').downcase end |