Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit de5ac2364a0b5c5fc6824b2c591de24d92d61878 1 parent c9ddf20
@perezd authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/barcoder.rb
View
4 lib/barcoder.rb
@@ -65,7 +65,7 @@ def barcode_to_disk(data, barcode, output_format)
File.open("#{BARCODE_STORAGE_PATH}/#{filename}", 'w') do |f|
f.write(data)
end
- image_tag("barcodes/#{filename}")
+ image_tag("barcodes/#{filename}", :id => "barcode", :class => "barcode")
end
# 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" />}
end
# this method tricks GBarcode into printing the contents of the EPS into
Please sign in to comment.
Something went wrong with that request. Please try again.