Betterment / demo_mode

A configurable demo mode for your Rails app. Specify your desired "personas" and Demo Mode will handle the rest.
MIT License
25 stars 8 forks source link

`RecordNotFound` after `rake db:reset` #7

Open smudge opened 1 year ago

smudge commented 1 year ago

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.