You have to add your action like this: map. Resources :users, :member=>{:choose-team=>:get} Because, if you have an action like index, which returns a collection of users than should be put in collection hash. If your action is specific to a user you have to add to the :member hash, now you will get an url like users/1/choose_team.
You have to add your action like this: map. Resources :users, :member=>{:choose-team=>:get} Because, if you have an action like index, which returns a collection of users than should be put in collection hash. If your action is specific to a user you have to add to the :member hash, now you will get an url like /users/1/choose_team.
Thank you so much! – Newbie May 31 '10 at 9:43.
You need put this route before your map. Resources :users first in first choose with route.rb.
In my routes. Rb, on top, I have already added map. Resources :users – Newbie May 31 '10 at 9:16.
Add following line in route. Rb and restatrt your server map. Resources :users, :collection=>{:choose-team=>:get}.
The line format. Html { redirect_to choose_team_path } isn't passing an id to choose_team_path. Your choose_team action uses the :id param but one isn't being supplied.
This is why you get the Couldn't find User without an ID error.
Now he edits his profile. He klicks on update and the data is saved. Now I want to redirect the user to another kind of profile-edit-page.
I did the following in my users_controller. I created a view: /users/choose_team.html. So I added choose_team to my routes.
If a user has no team_id, he should be redirected to my choose_team.html. Erb for choosing a team, else he should be redirected to his profile/show. How to do this?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.