Replies: 1 comment 3 replies
-
Hey @dmdboi! 👋🏻 It's similar to what Rails does with their bin/rails generate scaffold HighScore game:string score:integer
invoke active_record
create db/migrate/20190416145729_create_high_scores.rb
create app/models/high_score.rb
invoke test_unit
create test/models/high_score_test.rb
create test/fixtures/high_scores.yml
invoke resource_route
route resources :high_scores
invoke scaffold_controller
create app/controllers/high_scores_controller.rb
invoke erb
create app/views/high_scores
create app/views/high_scores/index.html.erb
create app/views/high_scores/edit.html.erb
create app/views/high_scores/show.html.erb
create app/views/high_scores/new.html.erb
create app/views/high_scores/_form.html.erb
invoke test_unit
create test/controllers/high_scores_controller_test.rb
create test/system/high_scores_test.rb
invoke helper
create app/helpers/high_scores_helper.rb
invoke test_unit
invoke jbuilder
create app/views/high_scores/index.json.jbuilder
create app/views/high_scores/show.json.jbuilder
create app/views/high_scores/_high_score.json.jbuilder That could be doable, but I am unsure how you would handle the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I believe a good enchancement to the v6 development experience would be to add a
make:all
command that could generate all the necessary files for a Resource.For example, run a single command and have a Model/Migration, Controller, Views and Routes generated.
I've made an command similar to this for v5, but I believe v6 should have it baked in.
https://github.com/weskerjs/supergen
With a bit more work, the command could be adapted to take into account @layout() tags when generating view files too
Beta Was this translation helpful? Give feedback.
All reactions