Posts

Advanced Heroku Settings For Rails
February 16, 2022

Deploying your Rails app to Heroku is generally straight forward, however there's a lot of additional configuration needed to make sure things scalable and memory efficient. The following are some tips and recommendations on setting up your Rails app on Heroku. Note, before setting these environment variables or adding the buildpacks,

railsherokudevops
Load More Pagination in Rails with Hotwire Turbo Streams
February 4, 2022

Hotwire (aka HTML Over The Wire) is a great addition to Rails, allowing you to build modern web applications without using much JavaScript. However if you are just getting started, it can be tough to get your head around how Turbo Frames and Turbo Streams work. In a recent project I

railsrubyhotwirebootstrap
Reusable Turbo-iOS Project Configured Entirely From Your Rails App
June 25, 2021

Ever since I started building Rails app, I've dreamt about one day building mobile apps in Rails. Well, that day has finally arrived, thanks to Turbo-iOS! With Turbo-iOS you can basically point an iOS app to your backend Rails app, it handles the native navbar functionality and pushing views however the

railsiosturboturboios
Rails Pattern For Including Nested Resources In API Responses
March 27, 2021

This Rails pattern provides a flexible way for clients to specify whether they want nested resources includes in the API response simply by passing a flag as a parameter to the endpoint. For example if you were building a simple blog, you would get Posts with Comments by calling posts.json?comments=true,

rubyrailsapi
Bootstrap Modals Using Hotwire In Rails
February 16, 2022

I recently implemented Bootstrap modals on RailsGems.com using Hotwire for showing Devise forms. However I ran into a few hurdles so wanted to share the lessons learned and the final implementation. 😎 One of my requirements was to show the modal by default, however when you open the link in a

railsbootstraphotwireruby
Rails Environment Variables Using Credentials
February 1, 2022

In your Rails app, do you use ENV or Rails.application.credentials? Is there an easy way to use both? Lets find out. I've been a long time fan of Figaro, a great gem that lets your store your environment variables in /config/application.yml. I've used it in most of my Rails apps for

railsruby
Git Aliases Are Like Superpowers
June 9, 2021

Using Git Aliases can make you feel like you have superpowers! It wasn’t until recently that I discovered Git Aliases, they are so handy that I seriously don’t know how I lived without them. These are two that I use every day now. Git Add Commit

git
Using Tables In Quilljs With Rails and Stimulus
March 25, 2021

This Stimulus controller will let you easily integrate Quill.js into your Rails project, including adding some missing table functionality. I’ve used lots of different WYSIWYG editors in the past, most are clunky or produce messy HTML, but Quill.js is a pretty light weight option that actually works fairly well. The

railsstimulusquilljs
Share The Gems You Love With RailsGems
February 15, 2022

Have you ever wondered what gems other developers like to use? What about your favorite Rails developers, what gems do they like? I sure have! That's why I built railsgems.com, an easy way to discover new gems, and share the gems you love. You can browse gems sorted by the most liked.

rubyrailshotwire
A starter blueprint to help fast track a new Rails applications
January 7, 2022

To help fast track setting up new Rails applications, I created a blueprint outlining steps for adding common functionality using some handy templates. https://github.com/dalezak/rails-blueprint To get started, simply clone the repo into a folder with the name of your application. git clone https://github.com/dalezak/rails-blueprint.git my_app Then move through the list in the README.md doing any

railsruby
GitHub Action to Attach Commits and Pull Requests to Trello Cards
April 27, 2021

This GitHub Action lets you easily attach GitHub commits and pull requests to a Trello card simply by including the card number in your git commit message. GitHub Issues is such a great tool for software development teams. However if the rest of your company is already using Trello, then you

githubtrellogithubactionsprojectmanagement
Using CanCanCan With StimulusReflex In Your Rails App
March 23, 2021

If you are using CanCanCan for authorization and also want to use the magic of StimulusReflex for reactive page updates, these strategies will help you check user abilities in your reflexes. CanCanCan is a powerful authorization library that allows you to authorize! the current_user for an action, as well as

railsstimulusreflexcancancan