From 6514294f6273a12194333f23d4679aed8d3b94ee Mon Sep 17 00:00:00 2001 From: Canan Date: Fri, 8 May 2020 23:05:12 +0300 Subject: [PATCH] Add welcome page --- app/assets/stylesheets/welcome.scss | 3 +++ app/controllers/welcome_controller.rb | 2 ++ app/helpers/welcome_helper.rb | 2 ++ app/views/welcome/index.html.erb | 1 + config/routes.rb | 2 +- test/controllers/welcome_controller_test.rb | 7 +++++++ 6 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 app/assets/stylesheets/welcome.scss create mode 100644 app/controllers/welcome_controller.rb create mode 100644 app/helpers/welcome_helper.rb create mode 100644 app/views/welcome/index.html.erb create mode 100644 test/controllers/welcome_controller_test.rb diff --git a/app/assets/stylesheets/welcome.scss b/app/assets/stylesheets/welcome.scss new file mode 100644 index 0000000..5042f7d --- /dev/null +++ b/app/assets/stylesheets/welcome.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the welcome 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/welcome_controller.rb b/app/controllers/welcome_controller.rb new file mode 100644 index 0000000..d8c85ab --- /dev/null +++ b/app/controllers/welcome_controller.rb @@ -0,0 +1,2 @@ +class WelcomeController < ApplicationController +end diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb new file mode 100644 index 0000000..eeead45 --- /dev/null +++ b/app/helpers/welcome_helper.rb @@ -0,0 +1,2 @@ +module WelcomeHelper +end diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb new file mode 100644 index 0000000..d8cb2cc --- /dev/null +++ b/app/views/welcome/index.html.erb @@ -0,0 +1 @@ +

Welcome to Pretro!

diff --git a/config/routes.rb b/config/routes.rb index c06383a..bc557ce 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,3 +1,3 @@ Rails.application.routes.draw do - # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html + root 'welcome#index' end diff --git a/test/controllers/welcome_controller_test.rb b/test/controllers/welcome_controller_test.rb new file mode 100644 index 0000000..59d2d0a --- /dev/null +++ b/test/controllers/welcome_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class WelcomeControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end