westonganger / active_snapshot

Simplified snapshots and restoration for ActiveRecord models and associations with a transparent white-box implementation
MIT License
103 stars 16 forks source link

Utilize ActiveRecord lazy loading #36

Closed westonganger closed 1 year ago

westonganger commented 1 year ago

Currently, the gem is loaded right away and requires active_record. When this happens, the database configuration is required even to run basic tasks like assets:precompile on a build host, which is sub-optimal. Lazy loading active record is the correct thing to do for gems referencing ActiveRecord.