Finding a Page2:55 with Jay McGavren
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.
You need to sign up for Treehouse in order to download course files.Sign up