diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..7bde84d --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +ruby-3.1.2 diff --git a/app/controllers/movies_controller.rb b/app/controllers/movies_controller.rb new file mode 100644 index 0000000..5b1fd53 --- /dev/null +++ b/app/controllers/movies_controller.rb @@ -0,0 +1,5 @@ +class MoviesController < ApplicationController + def index + @movies = ["Iron Man", "Batman"] + end +end diff --git a/app/helpers/movies_helper.rb b/app/helpers/movies_helper.rb new file mode 100644 index 0000000..493eee5 --- /dev/null +++ b/app/helpers/movies_helper.rb @@ -0,0 +1,2 @@ +module MoviesHelper +end diff --git a/app/views/movies/index.html.erb b/app/views/movies/index.html.erb new file mode 100644 index 0000000..8c7ad4c --- /dev/null +++ b/app/views/movies/index.html.erb @@ -0,0 +1,7 @@ +

The only movies that actually matter

+ + diff --git a/config/routes.rb b/config/routes.rb index 262ffd5..b83e046 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,3 @@ Rails.application.routes.draw do - # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html - - # Defines the root path route ("/") - # root "articles#index" + get "movies" => "movies#index" end diff --git a/test/controllers/movies_controller_test.rb b/test/controllers/movies_controller_test.rb new file mode 100644 index 0000000..cfd38a7 --- /dev/null +++ b/test/controllers/movies_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class MoviesControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end