rubycentral / cfp-app

Rails app for managing a conference CFP
MIT License
223 stars 154 forks source link

Fixes error when accessing schedule page on a custom domain #314

Closed jonsgreen closed 2 years ago

jonsgreen commented 2 years ago

Reason for Change

While working on custom domains I discovered that the schedule page is not accessible to the public from a custom domain url. This is easily masked when working from the backend because the current_event gets set that way. However, the constrained domain routes don't really require the event and instead are best accessed through the current_website which holds the logic for determining which event should be accessed from a custom domain.

You can actually see the problem right now if you try going to https://rubyconf.org/schedule and it redirects you to https://rubyconf.org/events.

Changes