Module: EffectivePermalinksHelper
- Defined in:
- app/helpers/effective_permalinks_helper.rb
Instance Method Summary collapse
Instance Method Details
#permalink_to(permalink_or_slug, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'app/helpers/effective_permalinks_helper.rb', line 9 def permalink_to(permalink_or_slug, = {}) permalink = if permalink_or_slug.kind_of?(String) Effective::Permalink.find_by(slug: slug) else permalink_or_slug end link_to permalink, permalink.redirect_path, end |