Rails Routing

Why

What

One interesting fact, for namespace and scope:

namespace :test do
	resources :cars, only: :index
end

# Equals to

scope :test, as: :test2, path: :test2 do
	resources :cars, only: :index
end

By the way, for scope with module set explicitly and namespace whose module is set implicitly. A module is automatically defined:

Module Test
end

How

Where

When

Who

Written on May 7, 2024