Skip to content

Generate from Rails classes #11

@wasabigeek

Description

@wasabigeek

Slightly ambitious, should be interesting. Rough approach:

Example generator classes:

We should be able to extract the argument and class_options and generate some generic components in React. There will be some that we want special logic (e.g. in [migrations](- https://github.com/rails/rails/blob/main/railties/lib/rails/generators/rails/migration/migration_generator.rb
) there is an argument: :attributes, type: :array... which we could use to insert the AttributeArguments component) but those can be edited manually.

There's also some intricacy to how some generators hook into others, which I haven't quite figured out yet e.g. there's a lot more logic relating to the model/migration's attributes. I'm guessing it invokes the ActiveRecord Model Generator)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions