You don't need to know Ruby or Rails. Read carefully, lean on your AI, and tell your interviewer what you see.
This is a sample file to help you get an idea for the type of backend code you'd work on.
dismiss_and_redirect_controller.rb— handlesGET /in-product-messaging/dismiss-and-redirect?notice=…&destination_key=….dismiss_and_redirect_controller_test.rb— one passing test.
In your own words:
- What does this controller do, and what does the
DESTINATION_PATHSmap represent? - Why does it wrap the write in
ActiveRecord::Base.connected_to(role: :writing) do … end? Reason from the code — the answer is in the method names if you read them carefully.
Your team just shipped a new "Get started with our CLI" nudge that lives on the dashboard. The CTA needs to dismiss the nudge and send the user to /copilot/cli.
The nudge id and destination key are both accelerate_ipm_copilot_cli_dashboard_nudge.
Copy the code exerpt to an editor of your choice then make two changes:
- Add the new entry to
DESTINATION_PATHSindismiss_and_redirect_controller.rb. - Add a new test in
dismiss_and_redirect_controller_test.rbthat mirrors the existing one — uses the new notice + destination key, asserts the redirect, asserts the notice was dismissed.
You don't have to run the test. We're assessing reading + diff-writing, not Ruby tooling setup. Use your AI to type if you like; you drive.
Edit the gist files in the browser and share your screen