Tutorials
Use class_names to Conditionally Apply CSS Classes - Andy Croll
Stop interpolating CSS classes with ternaries in your ERB templates.When you’re building views in Rails, you often need to apply CSS classes conditionally. Maybe a nav link should look different when it’s the current page, or a form field needs er...
kamal-backup: Scheduled Rails Backups for Kamal Apps
kamal-backup is two pieces: a Ruby gem you add to your Rails app, and a Docker image you boot as a Kamal accessory. They point at a restic repository you bring yourself.
The gem is your CLI. Local commands run directly on your machine using resti...
Avoid html_safe with Tag Helpers, safe_join, and sanitize - Andy Croll
Rails has better tools than html_safe for building HTML safely in your helpers and views.When you need to build HTML outside of a template, it’s tempting to concatenate strings and call html_safe on the result. This bypasses Rails’s built-in XSS p...
How I built a native iOS app with Rails and one YAML file
Every screen you see in Beervana is a Rails view, served over HTTPS, rendered in a WKWebView. There is no separate iOS codebase. There is no API. The “app” is my existing Rails app (same controllers, same ERB templates, same Turbo frames) loaded i...
Migrating a Rails App From Heroku to Railway - FastRuby.io | Rails Upgrade Service
How I migrated a multi-tenant Rails app from Heroku to Railway in about an hour, including the part where I accidentally broke the database.Last weekend I migrated my Doctor’s App from Heroku to Railway.
It’s a multi-tenant Rails app where each h...