...we're using building some of our sites using static site generators instead of Rails. You should talk about: Ease of development Security issues and maintenance costs Read through the...

What can't it do? What parts do you know from Rails? Practice Checkout the repo for the makandra blog Start the preview server Make some changes...

...or an explanation for anything here, tailored to what you already know. Just ask. 📄 Rails Guide: Active Record Query Interface — the reference for everything on this card; read Scopes and...

...Eager Loading Associations closely 📄 Battling N+1 queries in Rails — recognizing N+1 in the log and the tools that catch it (2024) 📄 Rails loading patterns: eager, lazy and strict...

...ten screens, and soon the same twelve lines of HTML live in ten places. Rails partials are the first tool against this; ViewComponent is the second, for components that carry...

...for anything here, tailored to what you already know. Just ask. Partials 📄 Partials in Rails views — our card: how a partial exposes its API through locals and a yielded block...

...lists, links, images and forms. Everything you build from here on attaches to it — Rails renders HTML, your CSS selects it, your JavaScript walks it. Important Work on this lesson...

...each exercise, inside the exercises repository. These are plain .html files — no server, no Rails yet. Open them in your browser with file://. Tip Your agent should work in the...

makandra Curriculum

You can use logs to locate a problem, e.g. by following the Rails log while you reproduce it, and add log output of your own.

...Unstuck — Joel Clermont, Laracon 2023 📄 Rubber ducking: not just a funny phrase Debugging tools 📄 Rails Guide: Debugging Rails Applications — the logger, the debug gem, web-console, and debugging memory issues...

...answers: an overview first, then narrower questions. You can trace a request through a Rails app with the agent's help, from the route to the response.

"Explain the conventions used in this project that differ from a default Rails app." "Give me a glossary of project-specific terms." Then dig into specifics:

makandra Curriculum

...server renders a normal page, only the target is swapped — and what the unpoly-rails gem adds on the server side. You can enhance links and forms so they update...

...in features wherever they fit. You can explain how Unpoly compares to Hotwire/Turbo, the Rails default. Resources Read what's new to you, skim what's familiar, skip what you...

...work that runs on a schedule. You can explain what Active Job is: a Rails abstraction with a uniform interface over any queue implementation — and why you still need to...

...underlying tool for anything non-standard. You can set up a queue in a Rails app that has none: install GoodJob, configure it as the Active Job adapter, and put...

The asset pipeline is one of Rails' two mechanisms how stylesheets, javascripts and images from your /assets folder are processed and delivered to the browser. Rails has a second pipeline...

...webpacker, which we will cover later. Learn Read Everything You Should Know About the Rails Asset Pipeline Read How to make your application assets cachable in Rails Read Managing vendor...

...agent can't infer from the code: the test command, conventions that differ from Rails defaults, gotchas. It is not the place for things the agent already does right, or...

...stack isn't the default one, and an agent reaches for the default (Our Rails stack, and why it isn't Omakase). Judging the design. Whether this is simple, whether...

...loads a new page. The browser does almost nothing but display. This is how Rails works out of the box: simple, robust, fast to build, easy to test with a...

...opens overlays, keeps scroll positions. Libraries in this family: Unpoly (our choice), Hotwire/Turbo (the Rails default), htmx. You keep the MPA's simplicity — one source of truth on the server...

...method is defined even when metaprogramming defined it, e.g. with Method#source_location, the Rails API docs or your IDE. You can write a monkey patch that wraps an existing...

...keyword args in Ruby 3.0 — our card: why argument forwarding needs care 📄 ActiveSupport::Concern — Rails API docs: what it adds to a plain module 📄 Modularity — our gem for parameterized modules...

...already know. Just ask. Code smells and refactoring ▶️ All the Little Things — Sandi Metz, RailsConf 2014; turning a knot of conditionals into small objects, step by step 📘 Ruby Science — thoughtbot...

...free PDF; a catalog of Rails code smells, each with the refactoring that fixes it 📄 Code smells and the refactoring catalog — the vocabulary: feature envy, long parameter lists, inappropriate intimacy...

Rails ships with two separate build pipelines: Sprockets ("asset pipeline") and Webpacker. Webpacker has many more moving parts, but allows us to use ES6 modules and npm packages (through Yarn...

...stack of tools. Start this card by skimming over the linked resource. Discussion Growing Rails applications in practice Read the following chapters from our book Growing Rails Applications in Practice...

...On following fashions Surviving the upgrade pace of Rails Owning your stack Discuss each chapter with your mentor. The Swinging Pendulum The XKCD about the sandboxing cycle is quite on...

...for anything here, tailored to what you already know. Just ask. 📘 "New rules for Rails" from Growing Rails Applications in Practice (in our library) — the CRUD-everything pattern 📄 Project management...

...lesson in builder mode. Jasmine is a purely client-side tool. It cannot ask Rails to render a view or access the database. Any HTTP calls must be mocked.

Tip Create the required DOM directly from your Jasmine spec. You cannot ask Rails to render a view. You can use Element#dispatchEvent() to emit events on a DOM...

...piece, but it should be tidy and clear. If you have generated styles from Rails scaffolding, delete them all. They don't look nice and we do not use them...

...framework, remove it and build your own styles from scratch. Tip Your MovieDB uses Rails 8 with esbuild. Sass support is already configured through the esbuild-sass-plugin library — there...

makandra Curriculum

...classes — and when a project benefits from it. You can integrate Bootstrap into a Rails app from npm as Sass, without a CDN, and load only the parts you need...

...and don't want to depend on external sources. To integrate Bootstrap into your Rails application, install bootstrap npm package. Import Bootstrap's Sass code from your stylesheets.

...exception notifications, and who reacts to them. You can integrate exception notification into a Rails app and verify it by triggering an error. You can explain what an error-monitoring...

...our card on integrating exception notification 📄 exception_notification — the gem's README 📄 Sentry for Rails — the official setup guide 📄 Controlling issue grouping in Sentry and deferring notifications for an issue...

...feature-binaries commit id: "docs" commit id: "add binaries" type: HIGHLIGHT commit id: "init rails" You are now asked to split up the add binaries commit to one commit per...

...id: "echo binary" type: HIGHLIGHT commit id: "curl binary" type: HIGHLIGHT commit id: "init rails" Exercise 3: Rebase onto a diverged feature branch with merge conflicts %%{init: { 'gitGraph': { 'mainBranchName': 'master...

...an explanation for anything here, tailored to what you already know. Just ask. 📘 Growing Rails Applications in Practice (Leanpub, also in our library) — read or re-read: "New rules for...

...Rails" (Beautiful controllers, Relearning ActiveRecord, User interactions without a database) and "Creating a system for growth" (Dealing with fat models, A home for interaction-specific code, Extracting service objects, Organizing...

makandra Curriculum

...it should display as 3.50. The rounding only needs to be applied when Rails renders the input. It does not need to be applied while the user is typing in...

...one (pnpm add, pnpm install), the lock file is pnpm-lock.yaml. See the card Our Rails stack for the bigger picture...