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,
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
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
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,
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
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
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
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
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.
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
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
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