@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://coffeescript.org/
+// Place all the styles related to the StaticPages controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,7 @@
+class StaticPagesController < ApplicationController
+ def home
+ end
+
+ def about
+end
@@ -0,0 +1,2 @@
+module StaticPagesHelper
@@ -0,0 +1,6 @@
+<h1>About</h1>
+<p>
+ School Platform, abbreviated as <i>SchPlat</i>, <i>SPlat</i> or simply
+ <i>SP</i> is a communications platform for students, teachers and
+ administrative staff in a school environment.
+</p>
+<h1>StaticPages#home</h1>
+<p>Find me in app/views/static_pages/home.html.erb</p>
@@ -1,3 +1,6 @@
Rails.application.routes.draw do
- # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
+ root 'static_pages#home'
+ get '/home', to: 'static_pages#home'
+ get '/about', to: 'static_pages#about'
end
@@ -0,0 +1,14 @@
+require 'test_helper'
+class StaticPagesControllerTest < ActionDispatch::IntegrationTest
+ test "should get home" do
+ get home_url
+ assert_response :success
+ test "should get about" do
+ get about_url