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. ↩
本文介绍了一种在Ruby on Rails项目中使用QR Code的方法。通过一个Rails插件,可以轻松地将JavaScript QR Code生成器集成到项目中。只需简单安装并调用qrcode函数即可在页面上生成指定大小的QR Code。
1812

被折叠的 条评论
为什么被折叠?



