Method: Padrino::Helpers::AssetTagHelpers#image_tag
- Defined in:
- padrino-helpers/lib/padrino-helpers/asset_tag_helpers.rb
#image_tag(url, options = {}) ⇒ String
Creates an image element with given url and options.
210 211 212 213 214 |
# File 'padrino-helpers/lib/padrino-helpers/asset_tag_helpers.rb', line 210 def image_tag(url, ={}) = { :src => image_path(url) }.update() [:alt] ||= image_alt(url) unless url.to_s =~ /\A(?:cid|data):|\A\Z/ tag(:img, ) end |