Complete the planned mission with basic requirements.
This commit is contained in:
parent
1e5f2d08e6
commit
d914bcd1dc
1
.ruby-version
Normal file
1
.ruby-version
Normal file
@ -0,0 +1 @@
|
|||||||
|
ruby-3.1.2
|
5
app/controllers/movies_controller.rb
Normal file
5
app/controllers/movies_controller.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class MoviesController < ApplicationController
|
||||||
|
def index
|
||||||
|
@movies = ["Iron Man", "Batman"]
|
||||||
|
end
|
||||||
|
end
|
2
app/helpers/movies_helper.rb
Normal file
2
app/helpers/movies_helper.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
module MoviesHelper
|
||||||
|
end
|
7
app/views/movies/index.html.erb
Normal file
7
app/views/movies/index.html.erb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<h1>The only movies that actually matter</h1>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<% @movies.each do |movie| %>
|
||||||
|
<li><%= movie %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
@ -1,6 +1,3 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
get "movies" => "movies#index"
|
||||||
|
|
||||||
# Defines the root path route ("/")
|
|
||||||
# root "articles#index"
|
|
||||||
end
|
end
|
||||||
|
7
test/controllers/movies_controller_test.rb
Normal file
7
test/controllers/movies_controller_test.rb
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
require "test_helper"
|
||||||
|
|
||||||
|
class MoviesControllerTest < ActionDispatch::IntegrationTest
|
||||||
|
# test "the truth" do
|
||||||
|
# assert true
|
||||||
|
# end
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user