Reputation: 2908
I want to redirect_to with object parameters. I've tried doing it different ways but none of them worked.
redirect_to user_path(params[:current_user.id])
redirect_to user_path(params[:current_user(params[:id])])
How am I supposed to do it?
Upvotes: 0
Views: 822
Reputation: 8003
redirect_to user_path(current_user)
#=> redirects to users/:id where :id is current_user.id
Upvotes: 2