-
-
Save sapient/1324899 to your computer and use it in GitHub Desktop.
This file contains 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
class ResumesController < ApplicationController | |
before_filter :authenticate_user! | |
respond_to :pdf | |
def index | |
end | |
def preview | |
# Error Correction Capacity (ECC) level | |
# L - 7% of codewords can be recovered | |
# M - 15% of codewords can be recovered | |
# Q - 25% of codewords can be recovered | |
# H - 30% of codewords can be recovered | |
@user = User.find_by_id params[:id] | |
@qrcode = RQRCode::QRCode.new 'test', :size => 4, :level => :h | |
request.format = :pdf # need this to return pdf | |
render :action => "show" | |
end | |
def show | |
# Error Correction Capacity (ECC) level | |
# L - 7% of codewords can be recovered | |
# M - 15% of codewords can be recovered | |
# Q - 25% of codewords can be recovered | |
# H - 30% of codewords can be recovered | |
@user = User.find_by_id params[:id] | |
@qrcode = RQRCode::QRCode.new 'test', :size => 4, :level => :h | |
request.format = :pdf # need this to return pdf | |
respond_with prawnto :inline => false, :filename => 'download.pdf' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment