Hey,

for some reason my admin_club_path(club) doesn't work anymore but only
admin_club_path(club.id). 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?

--
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.

Search Discussions

  • Heinz Strunk at Nov 24, 2011 at 8:53 am
    No one? I'm kinda stuck here...

    --
    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.
  • 島 涼平 at Nov 24, 2011 at 9:53 am
    hi.
    did you try "rake routes"?

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

    for some reason my admin_club_path(club) doesn't work anymore but only
    admin_club_path(club.id). 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?
    --
    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.
  • Heinz Strunk at Nov 25, 2011 at 12:37 pm
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 22, '11 at 5:39p
activeNov 25, '11 at 12:37p
posts4
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Heinz Strunk: 3 posts 島 涼平: 1 post

People

Translate

site design / logo © 2021 Grokbase