Fix the rails switcher logic better
Fix the rails switcher logic better

Change-Id: I562803d4086708baaba25a17eda4b56acaea7fc3
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/287323
Reviewed-by: Andrea Cirulli <b4e55ef5ee4bae8ad31f7c81009bfc0af1714a1f@instructure.com>
Reviewed-by: Aaron Ogata <11ccf682c06d1508642f943a3962a1c3d00b8e44@instructure.com>
Tested-by: Service Cloud Jenkins <9144042a601061f88f1e1d7a1753ea3e2972119d@instructure.com>
QA-Review: Jacob Burroughs <8ecea6e385af5cf9f53123f5ca17fb5fd6a6d4b2@instructure.com>
Product-Review: Jacob Burroughs <8ecea6e385af5cf9f53123f5ca17fb5fd6a6d4b2@instructure.com>

sfu/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,instructure/canvas-lms,instructure/canvas-lms,sfu/canvas-lms,instructure/canvas-lms