blueprinter icon indicating copy to clipboard operation
blueprinter copied to clipboard

Run blueprint generator whith another generator commands in Rails.

Open a-chacon opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe

Is just for make the creation of a project easier.

Describe the feature you'd like to see implemented

I would like to run something like rails g scaffold teacher name:string email:string and after all rails generators, run the blueprint generator too.

Something like this:

 rails g scaffold teacher name:string email:string
      invoke  active_record
      create    db/migrate/20240624222343_create_teachers.rb
      create    app/models/teacher.rb
      create    app/blueprints/teacher_blueprint.rb            <-------------------- HERE
      invoke    test_unit
      create      test/models/teacher_test.rb
      invoke      factory_bot
      create        test/factories/teachers.rb
      invoke  resource_route
       route    resources :teachers
      invoke  scaffold_controller
      create    app/controllers/teachers_controller.rb
      invoke    resource_route
      invoke    test_unit
      create      test/controllers/teachers_controller_test.rb

Describe alternatives you've considered

Just run rails g blueprinter:blueprint teacher

Additional context

No response

a-chacon avatar Jun 24 '24 22:06 a-chacon

Hey Andrés! Thanks for opening this.

We're thinking of moving the existing generator code outside of the this repository, and include it in blueprinter-activerecord instead. After we make a decision there, we can investigate the lift for including a Railtie that can provide this functionality.

lessthanjacob avatar Jul 01 '24 13:07 lessthanjacob

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 31 '24 01:08 github-actions[bot]