Overview

  • Understand the code in routes.rb
  • Construct your own routes, using either the preferred resourceful style or the match method
  • Identify what parameters to expect an action to receive
  • Automatically create paths and URLs using route helpers
  • Use advanced techniques such as constraints and Rack endpoints

Basics

The Rails router recognizes URLs and dispatches them to a controller’s action. It can also generate paths and URLs, avoiding the need to hardcode strings in your views.

Reference

Rails Routing from the Outside In