schema_to_scaffold
schema_to_scaffold copied to clipboard
Non interactive use
Thanks for the project. It might be nice to add a non interactive option or maybe just an output path. I was able to bash something together with:
✔ ~/Development/foo [master L|✔] $ echo '*' | scaffold -c -p db/schema.rb > tmp/foo.sh
/home/kyle/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/schema_to_scaffold-0.8.0/lib/schema_to_scaffold/schema.rb:31: warning: constant ::Fixnum is deprecated
✔ ~/Development/foo [master L|✔] $ head tmp/foo.sh
Loaded tables:
0. active_guests
1. active_users
...
✔ ~/Development/foo [master L|✔] $ tail tmp/foo.sh
rails generate scaffold StatusVersion opportunity:references status:string latest:boolean --no-migration
...
This seemed to work, but also included the front matter menu ( which is easy enough to remove by hand).
I agree this would be nice. For the moment I have not been using this gem. Maybe in a couple of months I will need it again and I will try to address your suggestion. In the meantime please go ahead and do a PR. I would be glad to merge it.