Module: Komments::ViewHelpers

Defined in:
lib/komments/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#komments_script_tag(async = true) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/komments/view_helpers.rb', line 3

def komments_script_tag(async = true)
  options = Hash.new
  options[:src] = Komments.website_url

  if async
    options[:async] = 'async'
  else
    options[:defer] = 'defer'
  end

  (:script, nil, options)
end