Module: Hibiki::Rails::Generators::UploadFieldInjections
- Included in:
- UploadFieldGenerator
- Defined in:
- lib/generators/hibiki/rails/upload_field_injections.rb
Overview
What hibiki:rails:upload_field writes into files the app already owns. Every injection is guarded by a wired? probe, so a re-run is a no-op, and every missing anchor downgrades to a manual_wiring notice rather than a half-edit.
Constant Summary collapse
- CHANNEL_ANCHOR =
", which the row form closes two blocks with.
The anchors, all text the scaffold templates emit verbatim. Thor's insert_into_file replaces EVERY match, so each anchor must occur exactly once in its file — never a bare "