Teddy
Teddy

Reputation: 597

What is the method for this route

In routes.rb I have

 map.resources :groups, :collection => { :find_or_create => :get, :search => :get } do |group|
group.resources :recruitment_periods, :controller => 'groups/recruitment_periods' do |period|
  period.resources :recruits,     :controller => 'groups/recruitment_periods/recruits'

if I wanted to redirect to the show action of a specific group,recruit_period, recruit what would the path be? i.e. redirect_to groups_recruitment_period_recruit_path(x,y,z)

Upvotes: 0

Views: 24

Answers (1)

DanneManne
DanneManne

Reputation: 21180

I think you almost had it. It looks like it should be:

redirect_to group_recruitment_period_recruit_path(x,y,z)

No plural on group since you know which one.

Upvotes: 2

Related Questions