Redirect depending on where the action has been triggered

Hi,
I am working on a newsletter module. you can subscribe to the newsletter
at many different place on the website and they all trigged the create
action on the newsletter controller.
I would to redirect to where the action has been triggered. How can I do
so?
Should I create an action in each controller that save the subscription?

Greg

Once the user of your application chooses to subscribe to your
newsletter then the create action will be called within the newsletter
controller. To redirect to the action that triggered the create
process what you can do is use:

redirect_to request.env['HTTP_REFERER']

This will redirect to the previous action and this will be the action
that triggered create.

redirect_to request.env['HTTP_REFERER']

Great!