module ImageHelper

Public Instance Methods

image_tag_with_at2x(name_at_1x, options={}) click to toggle source
# File lib/retinajs-rails.rb, line 7
def image_tag_with_at2x(name_at_1x, options={})
  name_at_2x = name_at_1x.gsub(%r{\.\w+$}, '@2x\0')
  image_tag(name_at_1x, options.merge("data-rjs" => asset_path(name_at_2x)))
end