1. In your rails project, install the plugin by following command:
./script/plugin install http://qrcode-rails.googlecode.com/svn/trunk/plugins/qrcode
2. Add javascript include tag in HTML header:
<%= javascript_include_tag :defaults %>
3. 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.
4. Done!
For details, please check the QRCode project page.
Sample Code
<%= qrcode('http://www.google.com/', 8 ) %>
./script/plugin install http://qrcode-rails.googlecode.com/svn/trunk/plugins/qrcode
2. Add javascript include tag in HTML header:
<%= javascript_include_tag :defaults %>
3. 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.
4. Done!
For details, please check the QRCode project page.
Sample Code
<%= qrcode('http://www.google.com/', 8 ) %>