Path helper doesn't get object's id automatically anymore?


for some reason my admin_club_path(club) doesn't work anymore but only admin_club_path( Anyone know what the reason could be?

This is the error message: No route matches {:action=>"show", :controller=>"admin/clubs", :id=>#<Club id: 98, name: "1. FSV Mainz 05 II", image: "mainz05.gif", photo_id: 3, league_id: 5, approved: false, permalink: "1-fsv-mainz-05-ii", created_at: "2011-11-22 16:43:13", updated_at: "2011-11-22 16:43:13">}

Apparently it takes the whoe object as id but why?

No one? I'm kinda stuck here...

hi. did you try "rake routes"?

(2011/11/23 2:39), Heinz Strunk wrote:

Yes, routes are there:                admin_clubs GET /admin/clubs(.:format) {:action=>"index", :controller=>"admin/clubs"}                            POST /admin/clubs(.:format) {:action=>"create", :controller=>"admin/clubs"}             new_admin_club GET /admin/clubs/new(.:format) {:action=>"new", :controller=>"admin/clubs"}            edit_admin_club GET /admin/clubs/:id/edit(.:format) {:action=>"edit", :controller=>"admin/clubs"}                 admin_club GET /admin/clubs/:id(.:format) {:action=>"show", :controller=>"admin/clubs"}                            PUT /admin/clubs/:id(.:format) {:action=>"update", :controller=>"admin/clubs"}                            DELETE /admin/clubs/:id(.:format) {:action=>"destroy", :controller=>"admin/clubs"}                       club GET /clubs/:id(.:format) {:action=>"show", :controller=>"clubs"}

The problem is that admin_club_path(club) doesn't work but admin_club_path( does.