From the course: Ruby on Rails 6 Essential Training

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Challenge: Dynamic templates

Challenge: Dynamic templates - Ruby on Rails Tutorial

From the course: Ruby on Rails 6 Essential Training

Start my 1-month free trial

Challenge: Dynamic templates

(upbeat music) - [Instructor] It's time for a challenge assignment. In this challenge, you're going to use what you've learned about dynamic templates. There's several objectives that I'd like you to try to complete. The first is that in the DemoController, we want to add a couple of new actions, #about and #contact. The ash or pound sign that's in front of each of those words is a convention for how we write Ruby method names. So those indicate that this is a Ruby method inside the DemoController class. Of course, once you create these actions, you'll also need a route to route requests to those actions and we're going to need some templates but our templates aren't going to be called #about and #contact. I want you to name them about_us and contact_us. So you'll need to create new files for those and make those work with our controller actions. You'll also want to write some HTML and text for those templates.…

Contents