Automatic identification and data capture

There are multiple barcode generator gems available, i decided on 'barby'
First I adding barby to the Gemfile file and using bundler to download and install said gem
Then I had to add the needed 'require' lines to controllers and views using barby. Code-128 is the type of barcode I needed to use.

require 'barby'
require 'barby/barcode/code_128'

Finally using the following lines of code I generated the barcode as a PNG and saved it into a file:

@barcode = Barby::Code128.new("1234")
outputter = Barby::PngOutputter.new(@barcode)
outputter.xdim = 2
File.open('barcode.png','wb') {|f| f.write outputter.to_png }

Taggings:

ProgrammingLanguage:

Improving usability of input forms in web applications

In the web application I am developing, I had a barcode input text field and a URL input text field for two different functions of the application. This resulted in 4 text input fields and 4 submit buttons. The layout of the web page became confusing for new users and clattered. I needed to reduce input fields in the front end but also in the already implemented back end.
Subscribe to Automatic identification and data capture