Commit 6eef2c3e authored by Zac Wood's avatar Zac Wood
Browse files

Added home controller, reorganized routes

parent 20168e6a
# 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:
// Place all the styles related to the Home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here:
class HomeController < ApplicationController
def index
<input type="text" title="search_text" placeholder="Enter CRN..."/>
<button title="search">Search</button>
<h2>Your classes</h2>
<th>Section Name</th>
<button title="export">Export to calender</button>
# Registers all routes for the app.
Rails.application.routes.draw do
resources :courses, only: [:index] do
resources :sections, only: [:index]
scope :api do # Register /api routes
resources :courses, only: [:index] do # GET /api/courses
resources :sections, only: [:index] # GET /api/courses/:course_id/sections
root 'courses#index'
# For details on the DSL available within this file, see
get 'home/index'
root 'home#index' # Set the root to be the home index
require 'test_helper'
class HomeControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get home_index_url
assert_response :success
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment