QR codes for ruby/rails using goqr.me API
Ruby
Switch branches/tags
Nothing to show
Latest commit a6a1a56 Nov 28, 2012 @patriciomacadden changed homepage
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
goqr.gemspec

README.md

goqr Build Status Code Climate

QR codes for ruby/rails using goqr.me API

patriciomacadden/goqr

Installation

Add it to your Gemfile and run the bundle command:

gem 'goqr'

Getting started

In rails, you can generate a QR code just using the goqr helper method:

<%= image_tag goqr(data: 'Hi! goqr is awesome!', size: '128x128') %>

Available options

All available options are the specified by goqr API documentation.

Gotchas

  • If you want to generate a QR code just for text or urls, use the data parameter normally:
<%= image_tag goqr(data: 'Just text') %>

<%= image_tag goqr(data: 'http://patriciomacadden.com.ar') %>
  • If you want to generate a QR code for phone numbers, just prepend TEL: in the data parameter:
<%= image_tag goqr(data: 'TEL:+542211234567') %>
  • If you want to generate a QR code for SMSs, just prepend SMSTO: in the data parameter, separating the phone number and the text by a ::
<%= image_tag goqr(data: 'SMSTO:+542211234567:Hi!') %>

Contributing

  1. Fork it
  2. Create a branch (git checkout -b my_awesome_branch)
  3. Commit your changes (git commit -am "Added some magic")
  4. Push to the branch (git push origin my_awesome_branch)
  5. Send pull request