Module: MetaRailsHelpers::MetaDescriptionHelper

Defined in:
lib/meta/rails/helpers/meta_description_helper.rb

Instance Method Summary collapse

Instance Method Details

#meta_description(identifier: :meta_description) ⇒ Object

Produces html meta element for description



4
5
6
7
8
9
# File 'lib/meta/rails/helpers/meta_description_helper.rb', line 4

def meta_description(identifier: :meta_description)
  meta_description = content_for(identifier)
  return if meta_description.blank?

  tag(:meta, name: 'description', content: meta_description)
end