Class: RakeAudit::Railtie
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- RakeAudit::Railtie
- Defined in:
- lib/rake_audit/rails/railtie.rb
Overview
Hooks RakeAudit into the Rails boot process.
The TaskPatch is prepended into Rake::Task only after the full Rails application has initialized, and only when a storage adapter has been configured. Deferring to after_initialize guarantees that the initializer (e.g. config/initializers/rake_audit.rb) has already run and that every dependency the adapter needs is loaded; skipping the prepend when no adapter is present keeps recording a true no-op for unconfigured apps.