osem-fcy/spec
Asish Kumar fae6332c36 Stop offering the schedule page when no schedule is published
The home and splash page render a link to the schedule based purely on
the `schedule_public` flag, even when an admin has not yet selected a
schedule or scheduled any events. Following that link rendered the
schedule view, which then failed inside `_carousel.html.haml` because
`@rooms` (and the selected schedule) had no data — a 500 error instead
of a graceful response.

Treat `schedule_public` as an allowance rather than an unchecked
control: introduce `Program#any_published_schedule?` (true only when
the flag is on *and* there is at least one event in a selected
schedule) and use it to decide whether to render the link from the
home and splash pages. The schedule controller now returns 404 when no
event has been scheduled, so bookmarked URLs surface as "not found"
instead of an internal server error.
2026-05-14 09:28:58 +05:30
..
ability Drop Organization abilities 2024-06-07 16:16:02 +02:00
controllers Stop offering the schedule page when no schedule is published 2026-05-14 09:28:58 +05:30
datatables Use CSS-compatible row IDs in datatables 2022-09-13 11:06:22 -07:00
factories Fix various typos 2025-10-15 11:15:47 +00:00
features Drop Rails.application.secrets usage 2025-08-12 17:27:25 +02:00
helpers Drop Organization from specs 2024-06-07 17:42:08 +02:00
mailers Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
models Stop offering the schedule page when no schedule is published 2026-05-14 09:28:58 +05:30
pdfs Resolve warning about test using not_to raise_error 2021-07-05 19:39:52 +02:00
routing Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
serializers Merge pull request #3090 from AndrewKvalheim/api-time-zone 2023-04-19 13:36:12 +02:00
support Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
spec_helper.rb Replace flash helper with "within" 2025-08-06 13:11:48 +02:00