Skip to Content
Ruby on Rails For Dummies®
book

Ruby on Rails For Dummies®

by Barry Burd
January 2007
Beginner
330 pages
6h 52m
English
Wiley
Content preview from Ruby on Rails For Dummies®

Chapter 10. I've Been Working on the Rails Code

In This Chapter

  • Displaying images

  • Adding new images to your Rails project

  • Using the RadRails Import Wizard

Chapter 9 demonstrates the creation of a photo album Web site. The site's managers (the folks at Chapter9Photos.com, Inc.) have hired a marketing team to promote the Web site. Here's an excerpt from the team's proposed marketing blurb:

  Visit Chapter 9 Photos online! See the filename and description of your favorite photo! 
In This ChapterEnter any filename you want — correct or incorrect. It doesn't matter, because the Web site
In This Chapter doesn't even display your photo!

How appealing! I can't wait to visit the site!

Displaying an Image

When I was a child, my family was so poor that we couldn't afford photos. All we could afford were the filenames of photos. That's why we created Chapter9Photos.com.

But these days, kids are spoiled. When they visit a photo album Web site, they expect to see photos, not just filenames! So this chapter adds visible photos to the site in Chapter 9.

Creating code

You can add images to a Web site with only a few lines of code. Here's how:

  1. If you haven't already done so, create a simple photo album Web site.

    Follow Steps 1 through 5 in the first section of Chapter 9.

  2. In the Rails Navigator view, find the project's public\images branch.

    The ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Ruby on Rails: Up and Running

Ruby on Rails: Up and Running

Bruce Tate, Curt Hibbs
Ruby on Rails® Bible

Ruby on Rails® Bible

Timothy Fisher
Learning Rails 5

Learning Rails 5

J. Mark Locklear, Eric J Gruber, Barnabas Bulpett

Publisher Resources

ISBN: 9780470081204Purchase book