-1

I'm building an events application, and I want to be able to retrieve each event's attendances by hitting an endpoint structured as in the question title: events/[event_id]/attendances. How do I declare such a route in routes.rb?

modsoussi
  • 137
  • 11

1 Answers1

2

Take a look at the rails guide on nested routing:

http://guides.rubyonrails.org/routing.html#nested-resources

John Naegle
  • 8,077
  • 3
  • 38
  • 47