Friday, August 13, 2021

ESM importmap and Marginalia

Posted by morgoth85

Hi, Wojtek here introducing you to upcoming Rails 7 goodies.

ESM importmap support

Modern web apps without JavaScript bundling or transpiling are now possible to build in Rails. Exciting new direction of frontend tooling, that most likely Rails 7.0 will aim. Introduced by DHH in this post.

Port Marginalia gem to Rails

Configurable tags can be automatically added to all SQL queries generated by Active Record. By default the application, controller and action details are added to the query tags, like this:
SELECT * FROM books /*application:MyApp;controller:books;action:index*/

Add multi db setup and reset tasks

Added support for multiple databases to rails db:setup and rails db:reset. Now those tasks can be run per database, like rails db:setup:primary.

No Spring in default stack

Faster computers have meant that most apps won’t see a big benefit from Spring on small to moderate size apps.

16 people contributed to Rails since last time. All the changes can be checked here. Until next week!