From e8475ea4366471f3eed18a6689b14979b8667be5 Mon Sep 17 00:00:00 2001 From: Clivern Date: Thu, 5 Aug 2021 21:08:28 +0200 Subject: [PATCH] fix --- app/assets/stylesheets/home.scss | 3 ++ app/controllers/home_controller.rb | 15 ++++++++++ app/helpers/home_helper.rb | 2 ++ app/views/home/home.html.erb | 38 ++++++++++++++++++++++++ config/routes.rb | 1 + test/controllers/home_controller_test.rb | 7 +++++ 6 files changed, 66 insertions(+) create mode 100644 app/assets/stylesheets/home.scss create mode 100644 app/controllers/home_controller.rb create mode 100644 app/helpers/home_helper.rb create mode 100644 app/views/home/home.html.erb create mode 100644 test/controllers/home_controller_test.rb diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss new file mode 100644 index 0000000..072f44e --- /dev/null +++ b/app/assets/stylesheets/home.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the home controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: https://sass-lang.com/ diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb new file mode 100644 index 0000000..68cb2a9 --- /dev/null +++ b/app/controllers/home_controller.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# +# Muffin - Coding Playground Platform. +# +# Copyright 2021 Clivern. All rights reserved. +# Use of this source code is governed by the MIT +# license that can be found in the LICENSE file. +# + +class HomeController < ApplicationController + def show + render 'home' + end +end diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb new file mode 100644 index 0000000..23de56a --- /dev/null +++ b/app/helpers/home_helper.rb @@ -0,0 +1,2 @@ +module HomeHelper +end diff --git a/app/views/home/home.html.erb b/app/views/home/home.html.erb new file mode 100644 index 0000000..17ddcf7 --- /dev/null +++ b/app/views/home/home.html.erb @@ -0,0 +1,38 @@ + + + + + Muffin - Coding Playground + + + + + +
+ +
+
+ + diff --git a/config/routes.rb b/config/routes.rb index 567006e..c15f006 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -9,6 +9,7 @@ # Rails.application.routes.draw do + get '/', to: 'home#show' get '_health', to: 'health#index' # Option Routes diff --git a/test/controllers/home_controller_test.rb b/test/controllers/home_controller_test.rb new file mode 100644 index 0000000..eac0e33 --- /dev/null +++ b/test/controllers/home_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class HomeControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end