app/helpers/labels_helper.rb
# !! Note that `label_tag` is a Rails reserved word, so we have to append and make exceptions
Note that `label_tag` is a Rails reserved word, so we have to append and make exceptions
Note that ` label_tag ` is a Rails reserved word so we have to append and make exceptions
def label_svg_tag(label)
    c = ::RQRCode::QRCode.new(label.text)
    content_tag(
      :span, 
      content_tag(:span, label.text, class: 'qrcode_text') +
      content_tag(
        :span, 
        c.as_svg(
          offset: 0,
          color: '000',
          shape_rendering: 'crispEdges',
          module_size: 1,
          standalone: true,
          viewbox: true,
          svg_attributes: {
            class: :qrcode_svg
          }
        ).to_s.html_safe,
        class: :qrcode_barcode
      ),
      class: :qrcode
    )
  end
def label_svg_tag ( label ) c = :: RQRCode :: QRCode . new ( label . text ) content_tag ( :span , content_tag ( :span , label . text , class : 'qrcode_text' ) + content_tag ( :span , c . as_svg ( offset : 0 , color : '000' , shape_rendering : 'crispEdges' , module_size : 1 , standalone : true , viewbox : true , svg_attributes : { class : :qrcode_svg } ) . to_s . html_safe , class : :qrcode_barcode ) , class : :qrcode ) end
Note that `label_tag` is a Rails reserved word, so we have to append and make exceptions
Note that ` label_tag ` is a Rails reserved word so we have to append and make exceptions
label
<not_specific>