Ajout de PagesController
This commit is contained in:
parent
2fd0266030
commit
5337aec5cc
4
app/controllers/pages_controller.rb
Normal file
4
app/controllers/pages_controller.rb
Normal file
|
@ -0,0 +1,4 @@
|
|||
class PagesController < ApplicationController
|
||||
def home
|
||||
end
|
||||
end
|
2
app/helpers/pages_helper.rb
Normal file
2
app/helpers/pages_helper.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
module PagesHelper
|
||||
end
|
4
app/views/pages/home.html.erb
Normal file
4
app/views/pages/home.html.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
<div>
|
||||
<h1 class="font-bold text-4xl">Pages#home</h1>
|
||||
<p>Find me in app/views/pages/home.html.erb</p>
|
||||
</div>
|
|
@ -5,5 +5,5 @@ 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 "checks#index"
|
||||
root :to => "pages#home"
|
||||
end
|
||||
|
|
8
test/controllers/pages_controller_test.rb
Normal file
8
test/controllers/pages_controller_test.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
require "test_helper"
|
||||
|
||||
class PagesControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get home" do
|
||||
get pages_home_url
|
||||
assert_response :success
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue