Dev-Links #21 - Ruby & Rails

15th April 2023 – 1172 words

In this new (revived) monthly section, I want to share links that I found interesting or that came up in our company’s monthly developer chat. This is a good way, to clean my bookmark list and maybe there are some interesting bits here and there for you as well.

Ruby

Flip Flop Operator in Ruby

Never came upon that operator, it looks really powerful but hard to grasp

GitHub - grosser/maxitest: Minitest + all the features you always wanted.

Minitest + all the features you always wanted.

Supercharges Minitest to have the great runner options like Rspec

Ruby Companies

Ruby Companies is an open-source list of companies that use Ruby or any of its frameworks (like Rails) to build software with.

Ultimate Guide to Rack::Attack

Learn how to get the most out of Rack::Attack to protect your Rails Application.

GitHub - jaredbeck/libyear-bundler: A simple measure of dependency freshness

A simple measure of dependency freshness.

GitHub - ioquatix/covered

Covered uses modern Ruby features to generate comprehensive coverage, including support for templates which are compiled into Ruby.

Rails

Did you know that you can use `sidekiq_options` with ActiveJob on Rails >= 6.0.1 and Sidekiq >= 6.0.1?

GitHub - madeintandem/jsonb_accessor: Adds typed jsonb backed fields to your ActiveRecord models.

Adds typed jsonb backed fields to your ActiveRecord models. - GitHub - madeintandem/jsonb_accessor: Adds typed jsonb backed fields to your ActiveRecord models.

GitHub - mrkamel/search_cop: Search engine like fulltext query support for ActiveRecord

Search engine like fulltext query support for ActiveRecord - GitHub - mrkamel/search_cop: Search engine like fulltext query support for ActiveRecord

MJML - The Responsive Email Framework

The only framework that makes responsive email easy. MJML is a markup language designed to reduce the pain of coding a responsive email.

Also has a rails plugin.

GitHub - actmd/abraham: Trackable application tours for Rails with i18n support

Trackable application tours for Rails with i18n support - GitHub - actmd/abraham: Trackable application tours for Rails with i18n support

Seems to be interesting: Keep a “tour” per view file that automatically gets loaded for new users

Embed a page builder into your Ruby on Rails app

Maglev is the only page builder for Ruby on Rails application. Similar to the Wordpress Elementor plugin but in RoR. Live preview, i18n, SEO, ...etc.

Looks interesting; another approach to adding a Wysiwyg site builder to Rails, this time with a promising block schema. Esp. for static landing pages which can be edited on the fly by end-users.

Tweet: you can easily track slow DB queries without any additional gems

Simple solution to notify slow queries as exception to the error tracking service.

GitHub - dogweather/asset_ram: Memoize your asset links. Saves my Rails app 17–95% allocations per request.

Memoize your asset links. Saves my Rails app 17–95% allocations per request. - GitHub - dogweather/asset_ram: Memoize your asset links. Saves my Rails app 17–95% allocations per request.

Some developer’s solution to reduce asset lookup in production by applying caching

Storing Ephemeral UI State with Kredis for Rails | AppSignal Blog

Let's dive into how Kredis works and how you can use it to store short-term UI state.

GitHub - woltapp/blurhash: A very compact representation of a placeholder for an image.

A very compact representation of a placeholder for an image. - GitHub - woltapp/blurhash: A very compact representation of a placeholder for an image.

GitHub - meilisearch/meilisearch-rails: Meilisearch integration for Ruby on Rails

Meilisearch integration for Ruby on Rails.

A simpler default controller implementation - Makandra

Rails has always included a scaffold script that generates a default controller implementation for you. Unfortunately that generated controller is unnecessarily verbose. When we take over Rails projects from other teams, we often find that controllers are the unloved child, where annoying glue co...

GitHub - jetruby/graphql-rails_logger: Display GraphQL queries in a more readable format

Display GraphQL queries in a more readable format.

Database

r/rails - New gem "Brick" that auto-creates migration and model files from any existing database

GitHub - plentz/lol_dba: lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts.

lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts. - GitHub - plentz/lol_dba: lol_dba is a small package of rake tasks that scan your application models and displays a list of columns that probably should be indexed. Also, it can generate .sql migration scripts.

GitHub - ankane/pghero: A performance dashboard for Postgres

PgHero is available as a Docker image, Linux package, and Rails engine. Select your preferred method of installation to get started.

GitHub - djezzzl/database_consistency: The tool to avoid various issues due to inconsistencies and inefficiencies between a database schema and application models.

The tool to avoid various issues due to inconsistencies and inefficiencies between a database schema and application models. - GitHub - djezzzl/database_consistency: The tool to avoid various issues due to inconsistencies and inefficiencies between a database schema and application models.