Pinned Repositories
029-infinite-scrolling
Infinite scrolling is now a common feature and there are several cases where it is really useful. For instance there are some websites where we simply can’t imagine a good pagination system, like Twitter or even Facebook.
042-fullcalendar
Learn how to incorporate FullCalendar into your Ruby on Rails application with listing and creating events. Using unobtrusive javascript, we can create a fast interactive calendar.
046-two-factor-authentication
Add multi factor authentication to your existing authentication solution. This gives your users the option to increase the level of security to their account and help prevent unauthorized access.
051-rails-api-authentication-with-jwt
Using the knock gem, we will add JWT Authentication to our Rails API Application.
070-nested-forms-from-scratch
Learn how to handle multiple models in a single form with accepts_nested_attributes_for and learn how to add and remove nested records through JavaScript.
154-service-objects-for-api-interactions-with-twilio
In this episode, learn how to extract the interactions with an external API into a service object so that code is isolated and interchangeable.
186-nested-forms-from-scratch-with-stimulusjs
Using StimulusJS controllers, adding nested forms to a Rails application is easy and unobtrusive. In this episode, we look at an alternative way of creating nested forms without the Cocoon gem.
275-hotwire
Hotwire is the newest magic which takes a different approach to building modern web applications without using much JavaScript.
294-building-a-questionnaire
Using StimulusJS and nested forms, we create the first parts of a questionnaire. Dynamic surveys can be difficult to architect and maintain. In this episode, we take a simple approach to creating questionnaires.
template
Base template for "all" Drifting Ruby episodes
Drifting Ruby's Repositories
driftingruby/042-fullcalendar
Learn how to incorporate FullCalendar into your Ruby on Rails application with listing and creating events. Using unobtrusive javascript, we can create a fast interactive calendar.
driftingruby/template
Base template for "all" Drifting Ruby episodes
driftingruby/191-inline-editing-records
Using Rails UJS, we create an interactive row editing solution without using any kind of Javascript frameworks.
driftingruby/445-streaming-llm-responses
In this episode, we look at running a self hosted Large Language Model (LLM) and consuming it with a Rails application. We will use a background to make API requests to the LLM and then stream the responses in real-time to the browser.
driftingruby/335-hotwire-modals
In this episode, we look at creating an unobtrusive and efficient way to launch Bootstrap modals using Turbo and Stimulus.
driftingruby/395-transcribing-with-artificial-intelligence
In this episode, we look at creating an audio transcription service which allows files uploaded from Active Storage to be transcribed with Artificial Intelligence. However, there are a lot of considerations around the approach from both a performance and thread safety perspectives.
driftingruby/201-working-with-large-data
When database tables get large, things can slow down significantly. In this episode, we look at a few things which helps keep databases performant and the client side responsive.
driftingruby/236-google-maps-api-with-stimulusjs
Add unobtrusive maps to your application using StimulusJS to tie in Google Maps Javascript API and Places API.
driftingruby/249-soft-delete-with-discard
Soft deletes for ActiveRecord done right.
driftingruby/378-stimulus-outlets-api
Outlets let you reference Stimulus controller instances and their controller element from within another Stimulus Controller by using CSS selectors. In this episode, we look at a simple example and then refactoring some older code where we used some workarounds to communicate with other stimulus controllers.
driftingruby/382-custom-turbo-stream-actions
With the release of Turbo 7.2, we gained the ability to create custom actions in Turbo. This allows us to trigger functions on the client side that would have been difficult or cumbersome to do in the past. In this episode, we look at setting up custom actions and how to use them.
driftingruby/427-detect-spam-with-ai
We can create a small python service that uses a Large Language Model (LLM) to detect if a message is spam or not. Using this service, we can tie it into our Rails application so that any comment created will be evaluated for being spam or not. We explore a few different routes on handling any messages flagged as spam.
driftingruby/223-like-relationships-and-global-id
In this episode we create a Like/Unlike system where users can like posts and use Global ID to obfuscate IDs.
driftingruby/408-broadcasting-progress-from-background-jobs
In a previous episode, we had created a custom ActionCable channel to assist in broadcasting updates from a background job. With the introduction of Turbo, we can simplify this process as we look at a few different approaches in displaying a progress bar with real time updates from background jobs.
driftingruby/413-pdf-reader
When previewing PDF files that were uploaded through Active Storage, we can only get a simple image of the first page. In this episode, we'll look at taking the uploaded PDFs and interacting with them.
driftingruby/422-embedding-stripe-checkout
driftingruby/431-hotkeys
driftingruby/436-turbo-8
driftingruby/459-hotwire-combobox
driftingruby/472-dependent-fields-with-hotwire
Large forms can be overwhelming to fill out, especially if not all of the fields are required. In this episode, we'll look at creating a stimulus controller to conditionally display fields based on the input of another field.
driftingruby/205-push-notifications-with-actioncable
In this episode, we look into using Push Notifications within our Rails application and then using ActionCable to broadcast Push Notifications to the user.
driftingruby/227-emojis-from-scratch
In this episode, we look at attaching emojis to our comments model, allowing them to fill in some emotional cues.
driftingruby/231-syntax-highlighting-with-action-text
Set up Action Text with client side Syntax Highlighting using Highlight.js.
driftingruby/245-tracking-changes-on-action-text
Without using any gems, we look at tracking changes within Action Text. It seems like a simple thing, but challenges arise through several layers of abstraction due to the flexibility that Action Text provides.
driftingruby/343-label-maker-with-ruby
driftingruby/369-hotwire-introduction
Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire. With Rails 7, we get Hotwire added in by default. In this episode, we look at some of the features with Hotwire and how to use them.
driftingruby/391-deploying-with-mrsk
driftingruby/417-system-tests
In this episode, we look at adding system tests in our application to test our Stimulus Controllers. We'll also look at how to DRY up some of the tests and how to run them in a headless environment.
driftingruby/468-processing-large-jobs
In this episode, we will upload a CSV file but need to pass it into a background job. This can prove to be difficult based on the hosting infrastructure so we'll explore some mechanisms to work around them. We'll also look to optimize Solid Queue to handle the large number of jobs.
driftingruby/site