Skip to content
Browse files

making sure there is a DOM friendly selector for your barcodes.

  • Loading branch information...
1 parent c9ddf20 commit de5ac2364a0b5c5fc6824b2c591de24d92d61878 @perezd committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/barcoder.rb
4 lib/barcoder.rb
@@ -65,7 +65,7 @@ def barcode_to_disk(data, barcode, output_format)"#{BARCODE_STORAGE_PATH}/#{filename}", 'w') do |f|
- image_tag("barcodes/#{filename}")
+ image_tag("barcodes/#{filename}", :id => "barcode", :class => "barcode")
# stream the barcode to the client as a data url. often times, the barcode
@@ -73,7 +73,7 @@ def barcode_to_disk(data, barcode, output_format)
# draw my own img tag for this, image_tag doesn't really like this.
def barcode_to_stream(data, format, str)
src = "data:image/#{format};base64,#{Base64.encode64(data)}"
- %Q{<img src="#{src}" alt="#{str}" />}
+ %Q{<img src="#{src}" alt="#{str}" id="barcode" class="barcode" />}
# this method tricks GBarcode into printing the contents of the EPS into

0 comments on commit de5ac23

Please sign in to comment.
Something went wrong with that request. Please try again.