Calling Action of Controller from another Controller in rails

Wajeeh Ahsan
1 min readFeb 7, 2020

--

Suppose you want to call show action of posts_controller from another controller like users_controller, this line will help you

redirect_to your_controller_action_url

To render show view of posts, this line is helpful

render ‘posts/show’

--

--

Wajeeh Ahsan
Wajeeh Ahsan

No responses yet