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
758c4ec2
Commit
758c4ec2
authored
Dec 17, 2018
by
Zac Wood
Browse files
fixed crash with online courses
parent
b47e5386
Pipeline
#3507
failed with stage
in 2 minutes and 15 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
758c4ec2
v2.1.0
-
Added "Save as PNG" feature for the calendar view
-
Fixed bugs related to exporting/sharing a view-only schedule
v2.1.1
-
Fixed crash related to adding online courses
schedules/Dockerfile
View file @
758c4ec2
...
...
@@ -10,6 +10,6 @@ ENV RAILS_ENV production
RUN
bundle
install
RUN
export
SECRET_KEY_BASE
=
$(
rails secret
)
RUN
ra
ke
assets:precompile
RUN
ra
ils
assets:precompile
RUN
rails db:migrate
RUN
rails db:seed
schedules/Dockerfile.dev
deleted
100644 → 0
View file @
b47e5386
FROM ruby:2.5
# Copy the project files to /api
COPY . /api
# Tell Docker to run all commands in /api
WORKDIR /api
# Install project dependencies
RUN bundle install
# Perform database migrations
RUN rails db:migrate
# Load the database from Patriot Web
RUN rails db:seed
schedules/app/controllers/schedules_controller.rb
View file @
758c4ec2
...
...
@@ -5,19 +5,26 @@ class SchedulesController < ApplicationController
def
show
valid_crns
=
@cart
.
reject
{
|
crn
|
s
=
CourseSection
.
find_by_crn
(
crn
)
s
.
nil?
||
s
.
start_time
==
"TBA"
||
s
.
end_time
==
"TBA"
s
.
nil?
}
@all
=
valid_crns
.
map
{
|
crn
|
CourseSection
.
latest_by_crn
(
crn
)
}
@events
=
generate_fullcalender_events
(
@all
)
@without_online
=
@all
.
reject
{
|
s
|
s
.
start_time
==
"TBA"
||
s
.
end_time
==
"TBA"
}
@events
=
generate_fullcalender_events
(
@without_online
)
end
def
view
@all
=
params
[
:crns
].
split
(
','
).
map
{
|
crn
|
CourseSection
.
latest_by_crn
(
crn
)
}
@events
=
generate_fullcalender_events
(
@all
)
@all
.
reject!
{
|
s
|
s
.
nil?
}
@without_online
=
@all
.
reject
{
|
s
|
s
.
start_time
==
"TBA"
||
s
.
end_time
==
"TBA"
}
@events
=
generate_fullcalender_events
(
@without_online
)
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