Method: Maglev::Content::Image#tag

Defined in:
app/components/maglev/content/image.rb

#tag(view_context, options = {}) ⇒ Object



30
31
32
33
34
35
36
37
38
# File 'app/components/maglev/content/image.rb', line 30

def tag(view_context, options = {})
  view_context.tag(:img,
                   {
                     src: url,
                     alt: alt_text,
                     data: (options.delete(:data) || {}).merge(tag_data)
                   }.merge(options),
                   false)
end