Blog
Recently I had the need for a signal strength UI indicator in a ruby on rails app and I didn't see one anywhere so I had to make one from completely from scratch. In the spirit of giving back to the community, here is that code as a viewcomponent. It may need some tweaks to...
Building AI powered features into Ruby on Rails applications has become increasingly common, but the development process can quickly become expen$ive and cumbersome when you're constantly hitting external APIs during testing and iteration. Every debug session, feature experiment, and streaming test can rack up costs while you wait for network requests to complete. This is...
Ruby on Rails has quietly introduced one of the most practical features for maintaining large-scale applications: the ability to mark associations as deprecated. This seemingly simple addition addresses a common pain point that many Rails developers have faced when working with legacy codebases or evolving application architectures. Anyone who has worked on a mature Rails...
As AI models become increasingly sophisticated, many website owners such as myself are concerned about their awesome blog posts being scraped and used to train AI systems without permission. If you're running a Ruby on Rails application and want to prevent AI bots from crawling your site, implementing proper bot blocking measures is essential. The...
Recently,. there was a discussion amongst my colleagues about why some of the models in our Rails 8 app inherit from ApplicationRecord while others inherit from ActiveRecord::Base. Lets dig in to these subtle but important distinctions, shall we? ApplicationRecord is a class that inherits from ActiveRecord::Base and serves as the base class for your applications...
Outlets represent one of Stimulus's most sophisticated tools for enabling seamless communication between javascript controller instances. Rather than relying on cumbersome event dispatching or global state management, Outlets provide a clean, declarative way to establish connections between different controllers using familiar CSS style selectors. (That is a bit of an oversimplification, TBH, but that is...
If you are looking to hire a ruby on rails developer that specializes in the ‘Hotwire' ecosystem of Turbo, Stimulus, and View Components, do drop me a line so we can have a chat.
Rails applications are full of callbacks that control the flow of your models' lifecycle events. Whether it's before_save, before_create, or any other callback, these hooks are essential for maintaining data integrity and business logic. But what happens when something goes wrong and your callbacks start throwing :abort? That's where Rails' lesser-known halted_callback_hook comes to the...
As Ruby on Rails developers, it can be tempting to dive straight into building as soon as a feature request appears. But taking a moment to ask the right questions before writing any code can save time, reduce complexity, and lead to much better results. Being intentional at the start of the process helps ensure...
People are starting to figure out that modern Rails, specifically Hotwire and Turbo Streams, is the perfect choice for building web and mobile apps that integrate with AI models. Thanks to the hotwire tools, integrating generative AI into your Ruby on Rails application has never been easier—or more powerful. With tools like Ollama, Rails' built-in...