I come across this page, a javascript QRCode generator. 1
To simplify the tasks to use it in Rails, I created a plugins QRCode for Ruby on Rails.
Usage
- In your rails project, install the plugin by following command:
./script/plugin install http://qrcode-rails.googlecode.com/svn/trunk/plugins/qrcodeAdd javascript include tag in HTML header:
<%= javascript_include_tag :defaults %>Add following funtion to where you want to generate QRCode.
<%= qrcode('http://www.google.com/', 2) %>
- The first parameter is URL
- The second optional parameter is pixel size.
For details, please check the QRCode project page.
Sample Code
<%= qrcode('http://www.google.com/', 8 ) %>
Sample Screen
- In case you dont know, QRCode is those mystic code appeared in most japanese media. Snap the QRCode by your cell phone, the code is translated into URL. ↩