TIL learned that tailwindcss-rails comes with some decent looking styles for scaffolds!
I'd love to pull this out to its own gem or template file but not super familiar with Rails templating. Anyone have any ideas on how I can start?
Conversation
Show replies
Replying to
Tried something here sometimes back github.com/beyode/rails-t
i will be interested to see how you implement it.
1
1
Replying to
If you copy the files of that PR as is to a new gem it should work with that railtie config
1
1
6
Replying to
Hey! I was one of the folks that worked on this PR, let me know if you need help.
1
Replying to
Will do, thank you! I’m going to try this and see how far I get.
Quote Tweet
Replying to @joemasilotti
If you copy the files of that PR as is to a new gem it should work with that railtie config
1
Replying to
Rails docs are decent starting place guides.rubyonrails.org/generators.html
It helps to know the generators are a subclass of github.com/rails/thor
Lastly, don’t be afraid to look at the railties source code for stuff that’s undocumented.
Replying to
The scaffold template structure seems to be voodoo. I have never seen documentation or decent how-to on this.
2






