I need to call one of two other controller actions from a first one (UsersController#show
) based on an if-else
-condition, which I also defined as methods of the controller and wherein I have put a render
directive.
Is there another way than redirect_to action: "profile"
because then I get the error message
No route matches {:action=>"profile", :controller=>"users", :id=>"1"}
Thanks
https://stackoverflow.com/questions/67358753/rails-controllers-call-another-action-of-the-same-controller-conditionally May 03, 2021 at 12:32AM
没有评论:
发表评论