home articles scribbles

Ruby on Rails

There are 4 posts in this series.

Scoped Active Record Associations

Active Record Associations are a great feature of Rails. But I had never thought of using them as scopes until last week! So let me show you a neat little trick that'll make your code much much more expressive (and keep your N+1 queries in check).

Read this essay →

Asynchronous HTTP requests in Rails

Let's look at how we can update parts of our app's pages with asynchronous HTTP requests. This is a step-by-step how-to with some good ol' Javascript fetch() method, and Rails native server-side partial rendering.

Read this essay →

How to use railway-oriented business transactions to unclutter your Rails controllers

When your Rails app needs to handle multiple steps, your controllers' methods can become a mess. Let's see how to Marie-Kondo them with dry-transaction

Read this essay →

Add Omniauth GitHub to Your Rails App on Top of Devise

As I’ve moved into the last three weeks of Le Wagon coding bootcamp, the need to authorize people to sign-up with GitHub quickly arise. Here's a step-by-step tutorial on how to do it when you already use Devise to handle authentification.

Read this essay →

Wanna read more? Browse the complete archive.