Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
schedules
Commits
6eef2c3e
Commit
6eef2c3e
authored
Apr 08, 2018
by
Zac Wood
Browse files
Added home controller, reorganized routes
parent
20168e6a
Changes
7
Hide whitespace changes
Inline
Side-by-side
schedules/app/assets/javascripts/home.coffee
0 → 100644
View file @
6eef2c3e
# 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/
schedules/app/assets/stylesheets/home.scss
0 → 100644
View file @
6eef2c3e
// Place all the styles related to the Home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
schedules/app/controllers/home_controller.rb
0 → 100644
View file @
6eef2c3e
class
HomeController
<
ApplicationController
def
index
end
end
schedules/app/helpers/home_helper.rb
0 → 100644
View file @
6eef2c3e
module
HomeHelper
end
schedules/app/views/home/index.html.erb
0 → 100644
View file @
6eef2c3e
<h1>
Schedules
</h1>
<input
type=
"text"
title=
"search_text"
placeholder=
"Enter CRN..."
/>
<button
title=
"search"
>
Search
</button>
<h2>
Your classes
</h2>
<table>
<tr>
<th>
Course
</th>
<th>
Section Name
</th>
<th>
CRN
</th>
<th>
Professor
</th>
<th>
Location
</th>
<th>
Days
</th>
<th>
Times
</th>
</tr>
</table>
<button
title=
"export"
>
Export to calender
</button>
schedules/config/routes.rb
View file @
6eef2c3e
# 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
end
end
root
'courses#
index'
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
get
'home/
index'
root
'home#index'
# Set the root to be the home index
end
schedules/test/controllers/home_controller_test.rb
0 → 100644
View file @
6eef2c3e
require
'test_helper'
class
HomeControllerTest
<
ActionDispatch
::
IntegrationTest
test
"should get index"
do
get
home_index_url
assert_response
:success
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment