0

I have created an extra route called 'add' in my Groups controller.

get 'groups/add', to: 'groups#add'

My goal is to have the following link http://localhost:3000/groups/4/add

I thought about doing this nested route

resources :groups do
  get 'groups/add', to: 'groups#add'
end

However when I run rake routes it is not listed. I have never really worked much with 'custom' routes before. I typically make due with the ones generated by a scaffold. How can I achieve this?

Trenton Tyler
  • 1,692
  • 3
  • 24
  • 53

1 Answers1

0

The following nested route has fixed my issue:

resources :groups do
  get 'add', on: :member
end
Trenton Tyler
  • 1,692
  • 3
  • 24
  • 53