Why does "user_path" cause a routing error in views done by "render" but not by "redirect_to"?
The "link_to" below works fine when the view is generated by a "redirect_to", but causes a unknown routing error when the view is开发者_JAVA技巧 generated by "render". It seems the URL helper doesn't propagate during renders?
link_to "user link", user_path(@user)
Check the value of @user
. That might be the issue.
精彩评论