Skip to content

madnificent/has_barcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HasBarcode
==========

HasBarcode is a plugin that adds barcodes to models.

The barcode specifies the id of the object, so objects can be identified by a barcode-scanner.  It is basically a simple wrapper around the 'barby' plugin for ruby.  The barcodes are stored in 128C barcode encoding ( http://en.wikipedia.org/wiki/Code_128 ) which is fairly dense for numbers.


Example
=======

The basic system is very easy to use:

  class Packet < ActiveRecord::Base
    has_barcode
  end

which allows you to say:

  p = Packet.find :first
  p.barcode.to_png  # renders a png barcode
  p.barcode.to_gif  # renders a gif barcode

a scanned barcode for an object of type Packet can be found by:

  Packet.find_by_barcode( scanned_code )



Copyright (c) 2008 MADnificent, released under the MIT license

About

A plugin for rails to easily identify objects by a barcode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages