Employers working - onboarding to card print
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
class SampleIdCardsController < ApplicationController
|
||||
|
||||
|
||||
def generate_sample
|
||||
@employer = Employer.find_by(slug: params[:employer_slug])
|
||||
sample_cards_pdf = SampleCardGenerator.new(@employer).call
|
||||
|
||||
send_data sample_cards_pdf.to_pdf,
|
||||
filename: "#{@employer.name.parameterize(separator: "_")}_sample_cards_#{Date.today}.pdf",
|
||||
type: "application/pdf",
|
||||
disposition: 'attachment'
|
||||
|
||||
end
|
||||
|
||||
def generate_print
|
||||
@employer = Employer.find_by(slug: params[:employer_slug])
|
||||
sample_cards_pdf = EmployerCardsGenerator.new(@employer).call
|
||||
|
||||
send_data sample_cards_pdf.to_pdf,
|
||||
filename: "#{@employer.name.parameterize(separator: "_")}_print_cards_#{Date.today}.pdf",
|
||||
type: "application/pdf",
|
||||
disposition: 'attachment'
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user