Module: RnStack::MetadataHelper
- Defined in:
- app/helpers/rn_stack/metadata_helper.rb
Instance Method Summary collapse
Instance Method Details
#set_metadata(title: nil, description: nil, og_tags: {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/helpers/rn_stack/metadata_helper.rb', line 3 def (title: nil, description: nil, og_tags: {}) content_for(:head) do capture do concat tag.title(title) if title concat tag.(name: "description", content: description) if description .each do |property, content| concat tag.(property: "og:#{property}", content: content) end end end end |