Module: Metanol::Helpers

Defined in:
lib/metanol/helpers.rb

Instance Method Summary collapse

Instance Method Details

#current_urlObject

Return a current URL

[View source]

35
36
37
# File 'lib/metanol/helpers.rb', line 35

def current_url
  request.original_url
end

#metanol_og_tagsObject

Render OpenGraph meta tags

[View source]

13
14
15
16
17
# File 'lib/metanol/helpers.rb', line 13

def metanol_og_tags
  result = metanol_render_tags ::Metanol::Meta::OpenGraph
  result << ::Metanol::Meta::OpenGraph.render_current_url(current_url)
  result.html_safe
end

#metanol_tagsObject

Render all meta tags

[View source]

4
5
6
7
8
9
10
# File 'lib/metanol/helpers.rb', line 4

def metanol_tags
  result = ''
  SUPPORT_GROUPS.keys.each do |type|
    result << send("metanol_#{type}_tags")
  end
  result.html_safe
end