Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMaryAnn Eleanya
8,626 Pointspage body isn't showing.
https://teamtreehouse.com/library/finding-a-page
In the video above, I was able to get the title whenever I clicked on the individual pages but for some reason the body text is not showing.
<h1><%= @page.title %></h1>
<p>
<%= @page.body %>
</p>
2 Answers
Jay McGavren
Treehouse TeacherMaybe body
is just returning nil
or an empty string for this Page
object. What do you see if you change @page.body
to @page.body.inspect
?
Or, you might try going into the Rails console, typing Page.find(this_pages_id_number).body
and see what you get there. If you get an error, please copy-paste it into this thread.
Justin Whedon
19,811 PointsI'm getting same issue... nothing shows .