Articles about "Rails".
How to Customize Rails Form Error Handling.
If you've worked with Rails forms, you've likely encountered the infamous .field_with_errors wrapper
. While it's designed to help highlight invalid fields, it can wreak havoc on your HTML structure and CSS styles. Fear not — there's an easy way to disable it!
How to Create Custom Error Pages in Rails.
Don't let error pages break your brand's flow. Learn how to create custom error pages in Rails that match your design, keeping the user experience smooth—even when things go wrong.
Cleaning up with clearing rake tasks.
Learn how to easily cleanup your Rails log
and tmp
files.
Introducing RailsbootUI: Rails View Components for Bootstrap.
We released a new product: RailsbootUI - it's our take on providing a simple yet professional view component collection for Rails with Bootstrap as the CSS framework under the hood.
Use gems from private GitHub repos.
Learn how to seamlessly integrate private gems from GitHub into your Ruby projects. This guide covers setting up your Gemfile, configuring local credentials, and using GitHub Actions for authentication. Perfect for developers looking to enhance their workflow with private repositories.
Rendering view component template variants outside of the current request.
Discover how to leverage ActionController::Rendering for rendering specific component variants outside the current view context with ease.
Split your routes.rb file into logical files.
Simplify your monolithic Rails application by splitting your routes into logical namespaces using Rails' internal draw
method. Instead of a cluttered routes.rb file, organize your routes into clear, manageable units like admin
, api
, etc. for improved clarity and maintainability.
Add zeitwerk:check rake task to you CI system.
Zeitwerk is Rails powerful code loader, handling all autoloading of ruby files with ease. While it requires specific filenames for classes, potential issues can be preemptively caught using the easy-to-use zeitwerk:check
rake task, ensuring your Rails application boots properly in production.