说明:目标
这是一个演示示例,演示如何创建qr代码,以帮助您使用导航应用程序。
。
需要做什么?
1.。
# Gemfile
gem 'rqrcode'
记得bundle install
2.创建一个新功能以显示QR码
新路线
# config/routes.rb
resources :restaurants do
member do
get :qr_code
end
end
一个新的Controller#Action
# app/controllers/
<weixin_42131790> 上传 | 大小:191kb