Class: Alula::LinkToTag
- Defined in:
- lib/alula/core_ext/tags/link_to.rb
Instance Attribute Summary
Attributes included from LiquidExt
Instance Method Summary collapse
Methods included from LiquidExt
included, #initialize, #render
Instance Method Details
#content ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/alula/core_ext/tags/link_to.rb', line 3 def content target = if @options["href"] @options["href"] elsif @options["slug"] item = @context.site.content.by_slug(@options["slug"]) item.nil? ? "" : item.url end @context.link_to(@options["source"], target) end |