From b3cb78a4d8de8bbd66c6ca4a1ec27c53a661a1d1 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Mon, 25 Sep 2023 15:07:57 -0500 Subject: [PATCH] Complete Lesson 11 --- app/views/layouts/application.html.erb | 2 +- app/views/movies/index.html.erb | 2 +- config/routes.rb | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index cbe11db..76728ae 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -15,7 +15,7 @@
diff --git a/app/views/movies/index.html.erb b/app/views/movies/index.html.erb index d9113a2..52f31a3 100644 --- a/app/views/movies/index.html.erb +++ b/app/views/movies/index.html.erb @@ -5,7 +5,7 @@

- <%= movie.title %> + <%= link_to(movie.title, movie_path(movie)) %>

<%= total_gross(movie) %> diff --git a/config/routes.rb b/config/routes.rb index b83e046..f91c3ee 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,5 @@ Rails.application.routes.draw do + root "movies#index" get "movies" => "movies#index" + get "movies/:id" => "movies#show", as: "movie" end