I need to achieve something like the following:
def some_function
redirect_to :action=> show ,:id=>current_user.id
end
// this will throw an error that id is nil
def show
@user=User.find(params[:id])
end
What can I try to achieve this?
You should redirect to an url, not to an action. Do something like this: