lorint / brick

Auto-generate models, views, controllers, and routes in a Rails app based on database structure
Other
269 stars 8 forks source link

Commands/ generators we can use with Brick #11

Open Azzawie opened 6 months ago

Azzawie commented 6 months ago

Could you list all the commands/ generators we can use with Brick, I tried to generate controllers but can't figure out the command. I tried this bin/rails g brick:controllers but had no luck.

lorint commented 6 months ago

I tried to generate controllers but can't figure out the command

Heya Mustafa -- thank you for reaching out about generators! Previously we didn't have one for controllers, so this morning have crafted an update to provide this feature. If you have Brick in an existing project then just run bundle update brick in order to pull down at least version 1.0.193, and then (just as you had expected), you can now run:

bin/rails g brick:controllers

Being as this is a first take on providing the functionality to auto-generate controller files, we would be eager to hear feedback and any further suggestions that you might have.

Other similar generators you can use include those for models, migrations, and seeds. In the future there are definite plans to have a generator for view templates, and possibly also one for routes.

Thanks very much!

-Lorin