StaffCoder
Ruby on Rails

Ruby on Rails Backend Exercises

Ruby on Rails 8.1
1 module · 4 challengesSign up
Module 1 of 1 · 4 challenges

Routing, Controllers & Strong Parameters

Learn how a request reaches your code and what it gets back. You'll build resourceful, custom, and nested routes, use strong parameters to protect server-owned fields, and return the right status code every time. The module ends with database constraints that turn bad data into a clean 422, not a 500.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Freight Shipment Endpoints

Sign up to unlock
25%1 of 4 solvedeasy
About this challenge

A freight forwarder's shipment API returns 200 for everything, accepts any field in the payload and lets clients overwrite the tracking number.

Solved in a browser IDE and graded by tests. Sign up to solve

Library Loan Actions

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

A public library's lending API treats returns and renewals as generic updates, so staff can change any field and returned books can still be renewed.

Solved in a browser IDE and graded by tests. Sign up to solve

Travel Booking Passengers

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

A travel agency's API lets passengers be added to any booking id, including bookings that are already ticketed, and its nested URLs run three levels deep.

Solved in a browser IDE and graded by tests. Sign up to solve

Book Catalogue Intake API

STAR
Solving it completes the module
100%1 of 1 solvedeasy
About this challenge

An online bookstore's intake endpoint writes titles into a table with no constraints, so duplicate ISBNs and zero prices reach the database.

Solved in a browser IDE and graded by tests. Sign up to solve

About this path

Learn to design backends that stay correct, secure, and fast as they grow. You'll start with routing, controllers, strong parameters, models, migrations, validations, associations, and queries. Then you'll move through service objects, authentication, middleware, API versioning, caching, and background jobs. You'll finish with what production apps depend on: query performance, transactions and locking, multi-tenancy, and resilient external integrations. Every exercise is a small piece of a real API, from shipments and library loans to bookings and catalogues, graded by a test suite the way a code review would grade it. You learn not just how Rails works, but how to make the decisions good backend engineers make every day. Finish able to build, structure, and reason about Rails applications with confidence.

Frequently asked questions

4

What will I practice in this path?

1 module: Routing, Controllers & Strong Parameters.

How many Rails exercises are there, and how hard are they?

4 exercises, all easy.

What does this path run on?

Challenges run on Ruby on Rails 8.1.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.