Sha256: 71e573634fb53d46f6e6b924cde19901989013c81bdc92c9a8e65956c62d58dc

Contents?: true

Size: 317 Bytes

Versions: 3

Compression:

Stored size: 317 Bytes

Contents

module RetinaJs
  class Engine < ::Rails::Engine
  end
end

module ImageHelper
  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-at2x" => asset_path(name_at_2x)))
  end
end
ActionView::Base.send :include, ImageHelper

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
retinajs-rails-2.1.1 lib/retinajs-rails.rb
retinajs-rails-2.1 lib/retinajs-rails.rb
retinajs-rails-0.2 lib/retinajs-rails.rb