Skip to content

Automatically populate attributes and types when generating factories for existing models #404

@stevecondylios

Description

@stevecondylios

This shows how to generate a factory for an existing model, for example;

rails g factory_bot:model Car name speed:integer

It would be pretty awesome if factory_bot could accept rails g factory_bot:model Car and assume that when no attributes/types are provided that the factory should be generated with every attribute in the model. That would make it even easier to add factory_bot to existing applications.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions