Access To Referring Controller


#1

I have a controller, that when it is finished doing it’s thing, should
always redirect back to the controller that called it. Is there any
built-in way to access who the referring controller was?

For example

A controller calls ControllerB

ControllerB does it’s thing and should be able to redirect back to the
previous controller, whether it is ControllerA or ControllerC, without
know who it was.

Is there any default way to do this? Seems like variable with the
referring controller and action would be pretty handy.


#2

Why not move the code into a library so it can be called from any
action without having to go to another controller?

~ Ben

On 4/26/06, Justin P. removed_email_address@domain.invalid wrote:

know who it was.
http://lists.rubyonrails.org/mailman/listinfo/rails


Ben R.
http://www.benr75.com