Class: Iron::QrCodesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Iron::QrCodesController
- Defined in:
- app/controllers/iron/qr_codes_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/iron/qr_codes_controller.rb', line 5 def show qr_code_link = QrCodeLink.from_signed(params[:id]) svg = RQRCode::QRCode.new(qr_code_link.url).as_svg(viewbox: true, fill: :white, color: :black) expires_in 1.year, public: true render plain: svg, content_type: "image/svg+xml" rescue ActiveSupport::MessageVerifier::InvalidSignature head :bad_request end |