You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running with demo mode enabled in local development, running rake db:reset will clear out any existing DemoMode::Session record. This can cause the application to break due to an ActiveRecord::RecordNotFound error triggered by one of the controller before_actions. Instead of raising a hard error, we could probably force a logout instead. We'd just need to think about whether this wouldn't mask real lookup issues.
The text was updated successfully, but these errors were encountered:
…27)
This addresses issue #7.
- Changes `Session.find` to `Session.find_by` in
`DemoMode::Demoable#current_demo_session` to prevent a Not Found
exception when the session is no longer in the database, e.g., after
resetting the database.
- Checks that the `current_demo_session` is not `nil` in
`DemoMode::Demoable#demo_splash!`.
- Adds a system spec for this scenario
When running with demo mode enabled in local development, running
rake db:reset
will clear out any existingDemoMode::Session
record. This can cause the application to break due to anActiveRecord::RecordNotFound
error triggered by one of the controllerbefore_action
s. Instead of raising a hard error, we could probably force a logout instead. We'd just need to think about whether this wouldn't mask real lookup issues.The text was updated successfully, but these errors were encountered: