(upbeat music)…- [Narrator] It's time for challenge assignment.…And in this assignment we're going to do a mail merge…using what we've just learned about templates.…The idea is that we're going to…read a template file that contains the text of a letter…and then we're also going to read a CSV file…to get information about number of people.…Then we're going to go through each of those people…and set instance variables for each person…so that we have the right data in our instance variables.…
Then we'll pass that data off to ERB so it can bind it…to our letter template and then…we'll take the results and we're going to save those…as files in a directory.…So we're essentially going to take a CSV file…and merge it to a letter and end up with…a whole bunch of text files that have the right information…as letters that we're ready to send out.…You can design your own letter template…and use your own CSV file if you want.…But in the exercise files I've included a template…that's for overdue library books.…So you can see it's letter_template.txt…
- File system basics
- Writing to and reading from files
- Renaming, deleting, and copying files
- Creating and editing directories
- Working with common data formats
- ERB templating
Skill Level Beginner
Ruby on Rails 5 Essential Trainingwith Kevin Skoglund10h 21m Beginner
1. The File System
2. Work with Files
3. Work with Directories
4. Common Data Formats
5. ERB Templating
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.