I have spent the last couple of hours Googling and trying any thing
that i think will work but i haven’t any luck.
Here is an outline of what I am trying to do.
I want to show a use there info by going to “http://localhost:3000/
users/5c6e957b523f931fdda3e9922b680c2d868cf44b” (random token)
This is what I have in the routes file and the controller.
root :to => “users#new”
match “/users/:token” => “users#show”
@user = User.find(params[:token])
At the moment it is giving me this error.
Started GET “/users/5c6e957b523f931fdda3e9922b680c2d868cf44b” for
127.0.0.1 at 2011-01-30 09:54:23 +1100
Processing by UsersController#show as HTML
Completed in 10ms
ActiveRecord::RecordNotFound (Couldn’t find User without an ID):
This is one of my first rails apps so I don’t know exactly what is
causing it - I guess that it will be a simple thing
Thanks for you help.