Created
October 17, 2013 18:51
-
-
Save jaronoff/7030235 to your computer and use it in GitHub Desktop.
I want to display a resume in a view, but have the data stored in something other than HTML so I can update it easily. Then, I want to also create a printable version that is easily sendable to people, but it's powered by the same data. So, technically, I update it in the site and then it updates a pdf.
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
I'm updating my site, repo is here: https://github.com/jaronoff/josharonoff.com | |
I want to include my resume on the homepage in a rendered partial, and I'm trying to figure out how to have the display pull the data from a data source, either a txt file or something in the database. I'm open to suggestions. | |
I'm using Foundation, and I want to be able to change the look and feel of the view, dependant on where in the site I have it. Example, on the homepage, maybe I only show where I've worked (company name.) but on the resume, I show all the data. Both pull from the same data set. | |
http://www.josharonoff.com/v6/resume/ | |
Here's the kind of data I'd be pulling from. | |
Any help is greatly appreciated... THANKS!! :) | |
~Josh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
###CONTROLLER
class ResumeController < ApplicationController
helper_method :resume
def show
end
protected
def resume
@resume ||= Resume.find_by_email("[email protected]")
end
end
Views - app/views/resumes/
show.html.erb
<%= resume.details %>
assuming your table resume has a details column to save your data
put a link here to download your resume as PDF. clicking that will make another call to controller to generate PDF version of your resume.
I hope it helps