Creating a Show View2:01 with Jay McGavren
We're displaying some raw text for individual Page records, but we'd like to display a full HTML page. For that we're going to need an ERB template.
This video shows a call to
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