Maybe you are already familiar with includes or preload, but you know that a lot of the time you will need more than just preload(:comments). It is common to have complex nested associations, scopes that you need or want to reuse, places where preloading all the associated records could hurt the performance of your app. How do you work with complex nested associations?… How do you simplify the preloading of those nested associations?… How do you “preload an scope”?… How do you preload just the latest n of each record?

#Backend#Ruby on Rails
Added: 6 Oct 2021
Conditional Border Radius In CSS - Ahmad Shadeed

How to use CSS comparison functions to create a conditional border radius

#CSS
Added: 4 Oct 2021
Rails Testing Antipatterns: Fixtures and Factories

Get familiar with common antipatterns in writing tests for Rails applications when using fixtures and/or factories to manage dependencies.

#testing
Added: 3 Oct 2021

I just write here

#Ruby
Added: 1 Oct 2021
The Future of CSS: Cascade Layers (CSS @layer)

When authoring CSS we have to carefully think about how we write and structure our code. Cascade Layers (CSS @layer) aim to ease this task.

#CSS
Added: 1 Oct 2021
Disable-With Using StimulusJS

DHH recently announced that Hotwire is going to be included in Rails 7 by default. Due to its...

#HOTWire#Ruby
Added: 1 Oct 2021
Multi-Factor Authentication for Rails With WebAuthn and Devise

If someone steals your password, they can pretend to be you. That's why many companies provide two-factor or multi-factor authentication via a fingerprint scan, a YubiKey, an authenticator app, or SMS. In this article, Petr Hlavicka will give you a solid foundation of knowledge about multi-factor...

#Ruby on Rails
Added: 30 Sept 2021
Using the new `weekday_select` in Rails 7

In most of the Rails apps I've built over the years I've had to add my own helpers for a weekday...

#Ruby
Added: 24 Sept 2021
Stimulus 3

The third major release of Stimulus represents a big milestone for the Hotwire community. This is the first release where every substantial new feature came as a contribution from outside of Basecamp and HEY. We've got a new package, action parameters, default values, target lifecycle callbacks, debug mode, utility-CSS support, and Con...

#HOTWire#Javascript
Added: 24 Sept 2021
Your Program is a Special and Unique Snowflake

Simplify and clarify your code by carefully choosing abstractions.

#Ruby
Added: 24 Sept 2021
Developer Decisions For Building Flexible Components — Smashing Magazine

In this article, we’ll walk through the process of taking a seemingly simple design for a text-and-media component and deciding how best to translate it into code, keeping in mind the needs of both users and content authors.

#Design#Frontend
Added: 23 Sept 2021
Ruby for ebook publishing

A lot of times, people ask what’s Ruby good for apart from Rails. Ruby is great for various tasks from several different domains, and today, I would like to share how anybody can use Ruby in publishing ebooks.

#Ruby
Added: 22 Sept 2021
An Intro to JavaScript Proxy

Have you ever been in a situation where you wish you could have some control over the values in an object or array? Maybe you wanted to prevent certain

#Frontend#Javascript
Added: 17 Sept 2021
Hotwire: Typeahead searching

Build a search-as-you-type text box with Turbo, Stimulus, and Rails.

#CSS#HOTWire#Javascript#Ruby on Rails
Added: 17 Sept 2021
Friendlier UUID URLs in Ruby - FastRuby.io | Rails Upgrade Service

In this article we will discuss and demonstrate how we can use Ruby to encode UUIDs into URL friendly representations. This article does not assume any previous knowledge about UUIDs. Instead we will first discuss what exactly a UUID is. We look at all the reasons we would prefer using...

#Ruby
Added: 17 Sept 2021
Hotwire: Server-rendered live previews

Turbo-charge your Article drafting feedback cycle with Hotwire-powered live previews.

#HOTWire
Added: 15 Sept 2021
Ruby 3.1 – Shorthand Hash Syntax – First Impressions

It's the time of year again, and with it comes a bundle of new Ruby 3.1 features getting approved and...

#Ruby
Added: 13 Sept 2021
Working With RBS in RubyMine | The RubyMine Blog

Starting with v2021.2, RubyMine provides code assistance for working with RBS files, along with all of the essential features that make RBS code easier to read. Here’s a brief overview. Creating RB

#Ruby
Added: 9 Sept 2021
RBS: How to Get the Most Out of RubyMine’s Code Assistance | The RubyMine Blog

The following article shows the benefits of investing some of your time into adding RBS declarations to your project. Catch type errors RubyMine performs real-time type checking based on the informati

#Ruby
Added: 6 Sept 2021
Announcing Bridgetown’s Public Roadmap for 2021-2022

The road to 1.0, plus upcoming opportunities to contribute to that vision to make it a reality.

#Ruby
Added: 4 Sept 2021
ECMAScript 2021 (ES12) new features

ECMAScript, the standardized version of JavaScript is increasing its popularity and is becoming...

#Frontend#Javascript
Added: 4 Sept 2021
How I keep my Rails controllers organized - Code with Jason

The problem to be solved As a Rails application grows, its controllers tend to accumulate actions beyond the seven RESTful actions (index, show, new, edit, create, update and destroy). The more “custom” actions there are, the harder it can be to understand and work with the controller. Here are three tactics I use to keep …

#Ruby on Rails
Added: 3 Sept 2021
Using Hotwire with Rails

Hotwire is a way to build modern web applications without much JavaScript by sending HTML over the wire. In this article, Renata Marques introduces us to Hotwire and walks us through a simple example.

#HOTWire
Added: 30 Aug 2021
Responsible Monkeypatching in Ruby

Monkeypatching can be a great way to improve existing code if used right. Let's find out how.

#Ruby
Added: 25 Aug 2021
HEY-inspired Pop-ups Using Hotwire

Disclaimer: It should be noted that the provided HTML fails to implement the necessary ARIA...

#HOTWire
Added: 20 Aug 2021
First Previous Next Last