module
Importance_1
v5.1.7 - Show latest stable - 0 notes

Routing Concerns allow you to declare common routes that can be reused inside others resources and routes.

concern :commentable do
  resources :comments
end

concern :image_attachable do
  resources :images, only: :index
end

These concerns are used in Resources routing:

resources :messages, concerns: [:commentable, :image_attachable]

or in a scope or namespace:

namespace :posts do
  concerns :commentable
end
Show files where this module is defined (1 file)
Register or log in to add new notes.