Project

goqr

0.0
No commit activity in last 3 years
No release in over 3 years
QR codes for ruby/rails using goqr.me API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

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