Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
Adding a Welcome Page
Browse files Browse the repository at this point in the history
  • Loading branch information
sdflem committed Jan 24, 2020
1 parent 1e756bc commit 71ee066
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/static_pages.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the StaticPages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
9 changes: 9 additions & 0 deletions app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
class StaticPagesController < ApplicationController

def welcome
respond_to do |format|
format.html { render :welcome }
end
end

end
2 changes: 2 additions & 0 deletions app/helpers/static_pages_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module StaticPagesHelper
end
21 changes: 21 additions & 0 deletions app/views/static_pages/welcome.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<h1>Welcome to QuizMe!</h1>

<p>
QuizMe is a free Quizlet style quizzing application that helps you learn by taking quizzes and trying to improve your scores.
</p>

<h2>Features</h2>

<p>
QuizMe allows users to:
</p>

<ul>
<li>Choose from premade quizzes on a variety of topics</li>
<li>Make your own quizzes to customize your learning</li>
<li>Compare your scores with other users</li>
</ul>

<p>
QuizMe also supports a variety of question styles like multiple choice and fill in the blank.
</p>
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Rails.application.routes.draw do
get 'welcome', to: 'static_pages#welcome', as: 'welcome'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
9 changes: 9 additions & 0 deletions test/controllers/static_pages_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'test_helper'

class StaticPagesControllerTest < ActionDispatch::IntegrationTest
test "should get welcome" do
get static_pages_welcome_url
assert_response :success
end

end

0 comments on commit 71ee066

Please sign in to comment.