Skip to content

feat: support multiple generator instances for Rails monolith sub-apps#32

Merged
ElMassimo merged 1 commit intomainfrom
claude/plan-pending-issues-32nIk
Mar 25, 2026
Merged

feat: support multiple generator instances for Rails monolith sub-apps#32
ElMassimo merged 1 commit intomainfrom
claude/plan-pending-issues-32nIk

Conversation

@ElMassimo
Copy link
Copy Markdown
Owner

Add a named configuration registry so each sub-app in a Rails monolith
can have its own serializer dirs, base serializers, and output location.

  • TypesFromSerializers.config(:name) { |c| ... } registers a named config
  • generate_all / generate_all_changed iterate over default + named configs
  • all_changes returns one Changes tracker per registered config for the railtie
  • with_active_config temporarily sets @config so refinements pick up the
    correct config during each sub-app's generation pass
  • Railtie now calls generate_all/generate_all_changed; rake task uses generate_all
  • Fully backward compatible: existing single-config usage is unchanged

https://claude.ai/code/session_01RFmXp2pX7DSYeLyNfWtmoE

Add a named configuration registry so each sub-app in a Rails monolith
can have its own serializer dirs, base serializers, and output location.

- `TypesFromSerializers.config(:name) { |c| ... }` registers a named config
- `generate_all` / `generate_all_changed` iterate over default + named configs
- `all_changes` returns one Changes tracker per registered config for the railtie
- `with_active_config` temporarily sets @config so refinements pick up the
  correct config during each sub-app's generation pass
- Railtie now calls generate_all/generate_all_changed; rake task uses generate_all
- Fully backward compatible: existing single-config usage is unchanged

https://claude.ai/code/session_01RFmXp2pX7DSYeLyNfWtmoE
@ElMassimo ElMassimo merged commit 33ce3c1 into main Mar 25, 2026
3 of 4 checks passed
@ElMassimo ElMassimo deleted the claude/plan-pending-issues-32nIk branch March 25, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants