Module: Metanol::Helpers

Defined in:
lib/metanol/helpers.rb

Instance Method Summary collapse

Instance Method Details

#current_urlObject

Return a current URL


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

def current_url
  request.original_url
end

#metanol_og_tagsObject

Render OpenGraph meta tags


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

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


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

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