Skip to content

Instantly share code, notes, and snippets.

@yuyalush
Created March 14, 2013 08:04
Show Gist options
  • Save yuyalush/5159674 to your computer and use it in GitHub Desktop.
Save yuyalush/5159674 to your computer and use it in GitHub Desktop.
Padrino使ってQRcodeを表示させる ref: http://qiita.com/items/61189db4743d8cd63ded
$ padrino g project testqr -e slim
$ cd testqr
$ bundle install
gem 'rqrcode'
gem 'rqrcode_to_svg'
$ padrino g controller qrtest get:index get:code
object type="image/svg+xml" data="code"
Testqr.controllers :qrtest do
get :index, map: "/index" do
render "qrtest/index"
end
get :code, map: "/code" do
RQRCode::QRCode.new('http://www.co-meeting.com', size: 4, level: :h ).to_svg
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment