Class: BootstrapEmail::Converter::AddMissingMetaTags
- Defined in:
- lib/bootstrap-email/converters/add_missing_meta_tags.rb
Constant Summary collapse
- META_TAGS =
[ {query: 'meta[http-equiv="Content-Type"]' , code: '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">'}, {query: 'meta[http-equiv="x-ua-compatible"]', code: '<meta http-equiv="x-ua-compatible" content="ie=edge">'}, {query: 'meta[name="x-apple-disable-message-reformatting"]', code: '<meta name="x-apple-disable-message-reformatting">'}, {query: 'meta[name="viewport"]', code: '<meta name="viewport" content="width=device-width, initial-scale=1">'}, {query: 'meta[name="format-detection"]', code: '<meta name="format-detection" content="telephone=no, date=no, address=no, email=no">'} ].reverse.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from BootstrapEmail::Converter::Base
Instance Method Details
permalink #build ⇒ Object
[View source]
12 13 14 15 16 17 18 |
# File 'lib/bootstrap-email/converters/add_missing_meta_tags.rb', line 12 def build META_TAGS.each do |tag_hash| unless doc.at_css(tag_hash[:query]) doc.at_css('head').prepend_child(tag_hash[:code]) end end end |