Articles of interest for Ruby on Rails
Displaying articles 26 - 50 of 479 in totalArticle Sources
-
How to use "ensure" in Ruby
Using ensure with blocks is extremely helpful for cleaning up things. We'll learn how to use ensure in Ruby for cleaning up open files as well as temporarily changing values for requests or test stubs.
Published:
-
Contributing to Open Source: Sidekiq Web UI Bug Fix
Learn how to quickly dig into an open source gem, replicate a bug, diagnose the problem, and contribute a pull request in just a few minutes.
Published:
-
Code Review: Refactoring the Receipts gem for Composability
Designing code for composability allows you to make code more testable, flexible, and easier to adapt in the long term. We'll look at how I recently refactored the Receipts gem so that you can easily customize receipts and still use built-in components.
Published:
-
How to add Feature Flags in Rails with the Flipper gem
Testing out new features or changes in production is something almost every application needs. Flipper is a fantastic tool with a GUI for rolling out these changes easily in your Ruby on Rails app.
Published:
-
How to manage and run Maintenance Tasks for Rails in Production
Deploying to production often requires running tasks to backfill new columns and other data. The maintenance_tasks gem from Shopify does a great job of allowing you to define tasks with arguments and run them in production.
Published:
-
How to add Search in Rails using Meilisearch
Meilisearch is an open source search engine written in Rust that integrates nicely with Rails to provide advanced search capabilities similar to ElasticSearch.
Published:
-
How Cross-Site Request Forgery (CSRF) Works in Ruby on Rails
Ever gotten an InvalidAuthentictyToken error in Rails and wondered how CSRF works? In this lesson, we'll learn how it works behind the scenes so you can understand exactly what's going on.
Published:
-
Inline Editing with Turbo Frames in Rails
Hotwire allows us to add inline editing easily in Rails forms using Turbo Frames. Learn how to implement them in a reusable manner so you can inline edit any fields across any model.
Published:
-
System Testing File Uploads in Rails with Uppy and Dropzone Drag & Drop
Learn how to use system tests for file uploads with file input fields and drag & drop with Uppy and Dropzone
Published:
-
Realtime Charts with Stimulus Target Callbacks
Learn how to use Stimulus Target Callbacks to trigger realtime Chart updates
Published:
-
Live Reload with Esbuild in Rails using an EventSource
Learn how to configure live reloading with Esbuild in Rails using an EventSource and jsbundling-rails
Published:
-
Migrating from Rails UJS to Hotwire: Data Method, Confirm, and Disable With
Turbo now provides equivalents to Rails UJS data confirm, disable with, and method attributes that we can use.
Published:
-
How to Write C Extensions for Ruby Gems
C extensions are a powerful tool to connect Ruby code with C libraries that can perform much faster than a pure Ruby counterpart.
Published:
-
How to use Kredis with Rails
Learn how to use Kredis and see it works by implementing a recent searches unique list
Published:
-
Using TDD To Fix A Bug In The Kredis Gem
I found a bug in the Kredis gem the other day and wanted to walk you through my thought process on debugging and using TDD to fix the bug for the future.
Published:
-
Refactoring Javascript with Stimulus Values API & Defaults
Refactoring a Javascript countdown timer into a reusable Stimulus controller gives a look at the flexibility we can achieve by taking advantage of the Stimulus Values API and customizing the default values.
Published:
-
Datatables From Scratch Using Hotwire
Ever wanted to build Datatables into your Rails app? You can using Hotwire using Turbo Frames without any custom Javascript.
Published:
-
Parallel ActiveRecord Queries with load_async in Rails 7
Complex queries can slow your page rendering down. We can now run long queries in parallel with Rails 7's load_async method in ActiveRecord to speed up page rendering.
Published:
-
Rails PR Code Review with Kasper Timm Hansen from the Rails core team
A code review with Kasper from the Rails core team to show us the process of reviewing, designing, and refactoring Rails code.
Published:
-
How to use jQuery & jQueryUI with Esbuild
Using jQuery and plugins like jQueryUI in modern Javascript can be a little tricky. We'll see how to use it, how to deal with javascript import hoisting and how to add plugins like jQueryUI
Published:
-
How to Migrate attr_encrypted to Rails 7 Encryption
Rails 7's built-in encryption is fantastic. This episode, we'll learn how to migrate our older attr_encrypted attributes to the new Rails 7 encryption.
Published:
-
How to use Bootstrap with CSS bundling in Rails
Installing Bootstrap is easier than ever thanks to CSS Bundling in Rails now. It also wires up the Javascript so you don't have to do much of anything.
Published:
-
How to use ESBuild in Rails with JSBundling
JSBundling provides a flexible way of using different Javascript bundlers like ESBuild. It strikes a great balance between the asset pipeline and webpacker. Plus, Esbuild can bundle your Javascript lightning fast.
Published:
-
How to Build Custom ActiveRecord Validations
Custom ActiveRecord validations are easy to make and they're implemented exactly the same way as the built-in Rails validations. It's super handy to be able to add nice, clean validations that you can repeat throughout your apps.
Published:
-
Testing API Requests
How do we test API requests in a Rubygem to make sure that we're integrating correctly with our backend? We'll learn how to use stubs to fake out the request and test our code without any network requests.
Published: