This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
We're trying to show individual Page records, and we've set up a route to the "show" method on the "PagesController". But that method doesn't exist yet. Let's visit the PagesController code, and add a show method now.
This video recommends calling render text:
, which works fine in Rails 5.0 (the recommended version to use when following along with this course). But if you happen to have generated your app using Rails 5.1 or later, render text:
no longer works.
In both Rails 5.0 and 5.1, you can replace render text:
with render plain:
, and it will work correctly.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up