Announcing Hot Glue: A Scaffolding Generator for the Turbo-Rails Era

ANNOUNCING Hot Glue: A Scaffold Generator for the Turbo-Rails Era

https://github.com/jasonfb/hot-glue

Hot Glue is a Rails scaffold builder for the Turbo era. It is an evolution of the admin-interface style scaffolding systems of the 2010s (activeadmin, rails_admin, and active_scaffold).

Using Turbo-Rails and Hotwire you get a lightning-fast out-of-the-box CRUD building experience. Every page displays only a list view: new and edit operations happen as ‘edit-in-place’, so the user never leaves the page.

It will read your relationships and field types to generate your code for you, leaving you with a ‘sourdough starter’ to work from. If you modify the generated code, you’re on your own if you want to preserve your changes and also re-generate scaffold after adding fields.

By default, it generates code that gives users full control over objects they ‘own’ and by default it spits out functionality giving access to all fields.

Hot Glue generates functionality that’s quick and dirty. It let’s you be crafty. As with a real hot glue gun, use with caution.

  • Build plug-and-play scaffolding for any CRUD on any object
  • mixes HAML and turbo_stream responses
  • Everything edits-in-place (unless you use --big-edit, then it won’t)
  • Automatically reads your ActiveRecord models and relationships (make them before building your scaffolding!)
  • Create-read-update-delete (CRUD) with pagination (one day: sorting & searching)
  • Excellent tool for prototyping and hackathons, but a knowledge of Rails is needed.
  • Nest your routes model-by-model for built-in poor man’s authentication. (Customers have_many :invoices; Invoices have_many :line_items; etc)
  • Plays nicely with Devise, but you can implement your own current_user object instead.
  • Kaminari for pagination.
  • Create specs automatically along with the controllers.
  • Throw the scaffolding away when your app is ready to graduate to its next phase (or don’t if you like it).
6 Likes

Your model only gets timestamp fields, which means that the only information that you can record about tellsubway your books (or whatever model you’re working with) is the time at which they were created, or updated.

Cool idea, should try it out at some point.