[Rails] Re: Path helper doesn't get object's id automatically anymore?
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(club.id) does.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home