osem-fcy/app/models
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
..
concerns Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
.gitkeep First checkin 2013-01-07 09:04:09 +01:00
.lodging.rb.swp Use url instead object in image_tag 2019-07-17 00:13:24 +02:00
ability.rb Fix: allow all users to view conference code of conduct (#3708) 2026-03-03 15:52:07 +01:00
admin_ability.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
answer.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
application_record.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
booth.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
booth_request.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
cfp.rb Replace registration-period datepickers with date input 2024-06-07 13:16:44 +02:00
comment.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
commercial.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
conference.rb Fix various typos 2025-10-15 11:15:47 +00:00
contact.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
difficulty_level.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
email_settings.rb Make use of ENV.fetch 2022-05-06 14:53:57 +02:00
event.rb Fix various typos 2025-10-15 11:15:47 +00:00
event_schedule.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
event_type.rb Rubocop autocorrections 2018-11-16 09:06:05 -08:00
event_user.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
events_registration.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
lodging.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
openid.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
payment.rb Autocorrect Rails/EnumSyntax 2024-12-02 13:15:26 +01:00
physical_ticket.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
program.rb Stop offering the schedule page when no schedule is published 2026-05-14 09:28:58 +05:30
qanswer.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
question.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
question_type.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
registration.rb Remove travel schedule from registration 2021-03-06 04:09:02 +01:00
registration_period.rb Replace registration-period datepickers with date input 2024-06-07 13:16:44 +02:00
resource.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
role.rb Drop halt_callback_chains_on_return_false 2019-05-05 09:40:49 +02:00
room.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
schedule.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
splashpage.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
sponsor.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
sponsorship_level.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
subscription.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
survey.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
survey_question.rb Autocorrect Rails/EnumSyntax 2024-12-02 13:15:26 +01:00
survey_reply.rb Add more options for surveys 2018-07-03 08:46:15 +03:00
survey_submission.rb Add more options for surveys 2018-07-03 08:46:15 +03:00
ticket.rb Fix various typos 2025-10-15 11:15:47 +00:00
ticket_purchase.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
ticket_scanning.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
track.rb Autocorrect new rubocop offenses 2025-08-12 16:44:20 +02:00
user.rb Fix various typos 2025-10-15 11:15:47 +00:00
users_role.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
vchoice.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
vday.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00
venue.rb Drop country_select 2023-05-08 17:09:55 +02:00
vote.rb Update events when rated 2023-03-01 11:33:21 -08:00
vposition.rb Add frozen_string_literal magic comment 2018-05-09 06:54:26 -07:00