Created
March 14, 2013 08:04
-
-
Save yuyalush/5159674 to your computer and use it in GitHub Desktop.
Padrino使ってQRcodeを表示させる ref: http://qiita.com/items/61189db4743d8cd63ded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ padrino g project testqr -e slim | |
$ cd testqr | |
$ bundle install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'rqrcode' | |
gem 'rqrcode_to_svg' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ padrino g controller qrtest get:index get:code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object type="image/svg+xml" data="code" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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