Rails

Advanced Ruby on Rails development strategies, best practices, and solutions for building scalable web applications.

The Ruby on Rails framework logo, representing Cuttlesoft's expertise in rapid web application development. This emblem symbolizes our proficiency in creating efficient, maintainable web applications. Our Rails development services include custom web applications, API development, database optimization, and enterprise-grade solutions.

Rails Posts

All Categories
A generator template file with a gear icon feeds into a conveyor belt producing three output files — a model, migration, and spec — illustrating how a single custom Rails generator command can scaffold multiple files from one template, eliminating repetitive boilerplate for patterns like namespaced models and service objects
August 8, 2023 • Katie Linero

How to Create Custom Generators in Rails

Rails generators are extensible by design, but most teams never build their own. This post walks through creating two custom generators from scratch, covering templates, argument parsing, flag options, and editing existing files.

Terminal tree output showing a Rails app/models directory with namespaced subdirectories — clinic/ containing appointment.rb, patient.rb, and provider.rb, and billing/ with invoice.rb — followed by the Ruby class definition Clinic::Appointment < ApplicationRecord, illustrating how directory structure maps to module namespacing in Rails
May 16, 2023 • Katie Linero

Namespaced Models in Rails: A Concern-Based Approach

Every namespaced association in Rails requires you to manually specify class_name, foreign_key, and inverse_of. The Namespaceable concern figures out those values from the namespace structure automatically. This post walks through the problem and provides the full, ready-to-use code.

Katie demonstrating RSpec matchers in Ruby and Rails during the "This Week I Learned" series to improve testing techniques.
September 28, 2022 • Frank Valcarcel

TWIL 2022-09-23

Dive into this week’s TWIL and uncover the secrets of RSpec matchers in Ruby and Rails, as Katie guides us through enhancing our testing practices for better precision and resilience.

Featured image for TWIL blog post on Rails Routing with a focus on Shallow Nested Resources - insights for Ruby and Rails developers.
June 29, 2022 • Frank Valcarcel

TWIL 2022-06-24

Explore this week’s TWIL feature: Rails Routing: Shallow Nested Resources. Katie breaks down how to make your Ruby and Rails coding more efficient.

Katie presents a Ruby on Rails coding tip on selecting a random record from a database model in the TWIL series.
February 2, 2021 • Frank Valcarcel

TWIL 2021-01-29

Dive into this week’s TWIL where Katie uncovers a quick Ruby on Rails tip—fetching random records with elegance. Elevate your coding with a versatile method.

Image for TWIL post depicting ActiveRecord range query examples in Ruby on Rails, enhancing database search efficiency.
September 16, 2020 • Frank Valcarcel

TWIL 2020-09-11

This week’s TWIL features Katie’s guide to using new range syntax in ActiveRecord queries, revealing how to efficiently search databases in Ruby on Rails.

Katie showing this week's TWIL blog post highlighting unique value generation with Faker and using FactoryBot in Rails testing.
July 28, 2020 • Frank Valcarcel

TWIL 2020-07-24

This week’s TWIL offers a quick boost in understanding unique value generation with Faker and the efficient use of FactoryBot for Rails testing.

Other Categories

Let's work together

Tell us about your project and how Cuttlesoft can help. Schedule a consultation with one of our experts today.

Contact Us