|
|
@ -1,6 +1,17 @@ |
|
|
class WorkExperiencesController < ApplicationController |
|
|
class WorkExperiencesController < ApplicationController |
|
|
before_action :set_work_experience, only: %i[ show edit update destroy ] |
|
|
before_action :set_work_experience, only: %i[ show edit update destroy ] |
|
|
|
|
|
|
|
|
|
|
|
def cv |
|
|
|
|
|
@full_name = "Rodolfo Leyes" |
|
|
|
|
|
# render layout: false, content_type: "application/octet-stream" |
|
|
|
|
|
tex_content = render_to_string(layout: false) |
|
|
|
|
|
File.open("./temp.tex", "w") do |f| |
|
|
|
|
|
f << tex_content |
|
|
|
|
|
end |
|
|
|
|
|
`pdflatex -interaction=batchmode temp.tex` |
|
|
|
|
|
render file: "#{Rails.root}/temp.pdf", layout: false |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
# GET /work_experiences or /work_experiences.json |
|
|
# GET /work_experiences or /work_experiences.json |
|
|
def index |
|
|
def index |
|
|
@work_experiences = WorkExperience.all |
|
|
@work_experiences = WorkExperience.all |
|
|
|