Topic: Yet another restful routes question
Maybe I'm just tired an need to take a break.. but if you have this in your routes:
map.resources :users do |users|
and /users/1/colors gives you the data you want, shouldn't you be able to generate the url like this:
<%= link_to "My Colors", colors_path(current_user)%>
I would think it's pretty straight forward, but I'm getting an error that says:
You have a nil object when you didn't expect it!
The error occurred while evaluating nil.to_sym
That happens even if I hard code it as colors_path(1) so I'm sure it's not an error with current_user being nil. Where am I going wrong?
Turning that link into color_path(1) gives me color/1 instead of users/1/colors