Currently writing about: AWS, React.js, Node.js, TypeScript, friction logs.

All results for tag: ruby-on-rails

Rails 7 Using React With ESBuild

Set up a new Rails 7 project with ESBuild that has TypeScript support out-of-the-box.

4 min read


Setting Up A Base GraphQL Server And GraphiQL With Rails 7

Follow along as we build out a skeleton Rails 7 server that enables us to use GraphQL.

7 min read


Repository Pattern In Rails

A look at how we can implement a Railsy-way of the Repository Pattern in our Rails apps.

10 min read


Dry Validation With Rails

Continuing on with our project, the next step is to add in dry-validation and dry-monads to help tidy up our code.

16 min read


Factory Bot With Rails

At this stage of the project, we are introducing Factory Bot to help replace the default fixtures so we can test our PostsRepository code.

11 min read


Action Cable Hello World With Rails 7

Dive head-first into using Action Cable with Rails 7 and setup a basic React project that can handle web sockets.

8 min read


Action Cable Messages With Redux

Continuing on from the last post, we introduce Redux to handle our remote messages and perform actions on our React.js application.

8 min read


Ruby On Rails Pagination With Kaminari

Implement simple pagination mechanisms using the Kaminari gem with Ruby on Rails 7.

9 min read


Using The Rails Cache With Redis

An entry-level introduction to setting up the Rails cache and seeing it in action with Redis in development.

6 min read


Getting Started With Sidekiq In Rails 7

A demonstration on getting a local development environment going with Sidekiq and Redis to run a simple demonstration job in Rails 7.

7 min read


Rate Limiting With Rack Throttle In Rails 7

This is the first of two posts that will look at rate limiting in Rails application. This post will focus on the rack-throttle gem and its usage with Redis.

6 min read


Rate Limiting With Rack Attack In Rails 7

In the second of two posts, we look at setting up rate-limiting with the rack-attack gem to see how we can limit requests to our API.

10 min read


Devise Part 1: Setting Up Devise With Rails 7 And React

In part one of this six part series on Devise and Ruby on Rails, we demonstrate setting up Devise for Rails 7 with a basic sign up and login flow.

5 min read


Devise Part 2: Using Redis Sessions Instead Of The Cookie Store

In part two of our Devise series, we look at how we can replace the default cookie session store with Redis.

3 min read


Devise Part 3: Updating Our Devise Views With Tailwind CSS

In part three of the series, we walk through how to add TailwindCSS to a Rails 7 project and spruce up our sign in page.

4 min read


Devise Part 4: Authentication With A Separate Frontend

In part four, we add in a separate Next.js project into the mix and demonstrate how to organize authentication for our main Rails API.

9 min read


Devise Part 5: OAuth With GitHub And OmniAuth

In part five, we set up the OmniAuth configuration for Devise to demonstrate login using GitHub.

7 min read


Devise Part 6: Adding Recaptcha To Prevent Fraud And Abuse

In part six, we enforce the usage of reCAPTCHA v2 to prevent signing up or logging in without passing the reCAPTCHA verification.

6 min read


Sending Your First Email With ActionMailer In Rails 7

Follow the basics to send an email using a Postmark template and view it in the browser during development.

13 min read


Devise Part 7: Testing With RSpec And Factory Bot

For this part, we look at setting up some helpers for us to log users in when writing controller tests.

6 min read


Devise Part 8: Policy Authorization In Rails 7 With Pundit

This post looks at how we outline required policies in order to fulfill requests in Ruby on Rails using the Pundit gem.

10 min read


Devise Part 9: Setting Up 302 Redirection vs 401 Unauthorized Handlers

In part nine, we take a look at how we can set up our API endpoints to return a 401 response if a user is not signed in instead of the default 302 redirect to the login page.

6 min read


ActiveAdmin With Ruby On Rails 7

ActiveAdmin is a powerful gem to help us generate admin panels for our internal usage for Rails applications. This post will cover the basics of getting up and running with ActiveAdmin and Ruby on Rails 7.

5 min read


Getting Started With The FriendlyID Gem In Rails 7

See how the FriendlyID gem makes it simple to convert you URLs into something more useful and friendly with Rails 7.

5 min read


Exploring Ahoy Analytics With Rails 7

This post is a reflection on my first look at using Ahoy analytics in a Rails 7 application.

4 min read


Devise Part 10: Devise Token Auth

In part ten of the Devise series, we start a new project from scratch to explore how the devise-token-auth gem can be setup with a Rails 7 application.

4 min read


Devise Part 11: Authentication Tokens With Doorkeeper

In part eleven of the Devise series, we continue on with the previous project to add the capability of authenticating to a public API using authentication tokens with Doorkeeper.

7 min read


Understanding Rails Associations

In this post, we go through all six of the possible Rails associations with visualizations to help us understand what associations are supported and how they work in Rails 7.

9 min read


Rails Entity-Relationship Diagrams

In this short post, see how you can visualize your domain model quickly using the rails-erd gem.

1 min read


Through Rails Associations

Following up on the previous post, we will be looking at the last through associations that come baked into Rails.

5 min read


Processing Local YAML Files With Sidekiq

See how you can use Sidekiq jobs to read and process a local YAML template for populating the database.

5 min read


Uploading Files In ActiveAdmin

See how to upload files to ActiveAdmin using this example that uploads a CSV file and populates data to the database.

5 min read


Annotated Rails Models

Help understand your Rails models easier with the help of the annotate models gem.

3 min read


Local ActiveStorage Development With Rails 7

Set up ActiveStorage on your local developer environment with Rails 7.

4 min read


Dennis O'Keeffe

2020-present Dennis O'Keeffe.

All Rights Reserved.