Skip to content

Commit a74967c

Browse files
committed
Add home page
1 parent 9c561ba commit a74967c

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

app/assets/stylesheets/pages.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Place all the styles related to the Pages controller here.
2+
// They will automatically be included in application.css.
3+
// You can use Sass (SCSS) here: https://sass-lang.com/

app/controllers/pages_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
class PagesController < ApplicationController
2+
def home
3+
end
4+
end

app/views/pages/home.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Honey I'm home!

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Rails.application.routes.draw do
2+
root 'pages#home'
23
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
34
end
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require 'test_helper'
2+
3+
class PagesControllerTest < ActionDispatch::IntegrationTest
4+
test "should get home" do
5+
get pages_home_url
6+
assert_response :success
7+
end
8+
9+
end

0 commit comments

Comments
 (0)