Module: ActionView::Helpers::AssetTagHelper
- Defined in:
- lib/action_view/helpers/image_tag_helper.rb
Instance Method Summary collapse
Instance Method Details
#image_tag_with_laziness(source, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/action_view/helpers/image_tag_helper.rb', line 5 def image_tag_with_laziness(source, ={}) = .symbolize_keys = .dup [:data] ||= {} [:data][:original] = path_to_image(source) [:class] ||= "" [:class] << " lazy" output = image_tag_without_laziness('grey.gif', ) output << content_tag('noscript', image_tag_without_laziness(source, )) end |