DEV Community

Rails Designer
Rails Designer

Posted on • Edited on • Originally published at railsdesigner.com

5

New: Rails Development Tool

This articles was originally published on Rails Designer


Over the past 10+ years I have built quite a few web apps using Ruby on rails. One of the tools I've copied over and over again was one that let me:

  • fill forms, like log in forms with some predefined details
  • toggle the console for a quick lookup or to fire a Turbo Stream Broadcast
  • highlight all Turbo Frames and Stimulus Controllers
  • copy the actual resource's id (ie. the primary key, instead of using the public-facing id)

Preview of the Spinal Builder app highlighting the Stimulus Controllers

The initial version was pretty simple, but over the years I've changed it a bit. It is now using ViewComponent and Stimulus (based on the @github/hotkey package, similar to Rails Designers' GlobalHotkeyComponent.

Update: it is now using Plain Old Rails Helpers!

Now I can type:

  • d f; fill fields with the predefined values;
  • d s; fill fields and submit the form;
  • d c; toggle the console;
  • d t; toggle highlight all Turbo Frames;
  • d e; toggle highlight all Stimulus Controllers;
  • d x; copy current URL;
  • d r; copy the given resource's id (customizable, you can pass anything).

Image description

Image description

(view the original articles for the moving gifs! 👀)

The Rails Development Tool is now available to everyone. Packaged simply as a template, so you own the code and can simply change it, extend and break it!

Check it out and install it today.

UPDATE: I added the template to GitHub for easier collaboration.

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (2)

Collapse
 
railsdesigner profile image
Rails Designer

Also: I am thinking of turning this tool into a Rails gem/engine. The cons of a gem is another dependency to keep up to date (in your app, but also as a maintainer). Pro is: invite us to help it improve it; which is trickier with the current packaging.

What do you think?

Collapse
 
railsdesigner profile image
Rails Designer

Got ideas for more features to add? Let me know! 👇

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs