Module: ResponsiveImageTag
- Defined in:
- lib/responsive_image_tag.rb,
lib/generators/responsive_image_tag/jquery_generator.rb,
lib/generators/responsive_image_tag/prototype_generator.rb
Defined Under Namespace
Modules: Generators
Instance Method Summary collapse
-
#responsive_image_tag(small, big, options = {}) ⇒ Object
Emits the special (and somewhat ugly) markup for our responsive image tag.
Instance Method Details
#responsive_image_tag(small, big, options = {}) ⇒ Object
Emits the special (and somewhat ugly) markup for our responsive image tag.
NB: the @image_path@ method is a private method of the Rails asset_tag_helper.
9 10 11 12 13 14 15 16 |
# File 'lib/responsive_image_tag.rb', line 9 def responsive_image_tag(small, big, = {}) output = tag "span", {:class => "img-placeholder"} output += tag "/span", nil, true output += tag "noscript", noscript_attributes(small, big, ), true output += image_tag(small, ) output += tag "/noscript", nil, true output end |