Redirecting to the view that 'called' a method

Hello,
I have a method called ‘take_part’ in a controller called ‘group’.

Currently I call this method from a view inside the group controller
called ‘show’ and after executing its function I do a redirect_to
:controller => ‘group’, :action => ‘show’, :id => params[:group_id]

Now I want to call this function from other controllers like for example
from the controller ‘event’, inside the view ‘show’, but I want to
redirect to this controller and this view.

How I can redirect to the view that called the function?

Thanks.

Sounds like you want “redirect :back”

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs