rails5 reloader
https://github.com/rails/rails/pull/33509 abych mohl testovat reloader přes app.reload! má někdo lepší řešení? vyjádření rails vývojářů proč to tak je
The expectation is that to_prepare can get things ready, and to_complete can then clean them up. That works fine for a clearer unit-of-work cycle like web requests or background jobs, but breaks down in the console.
This change leaves the console in the not-prepared state... that seems bad.
I recommend ensuring your to_prepare hooks are idempotent. They already get called multiple times during normal use; relying on exactly what the reloader will do in between is fragile at best.