I have a function that I use in my code in a number of places. It does some database lookup, processes it and returns some content to display. However, it needs to know where it was called from so that it can set up some return links. Currently I call it from a controller like this: @content = Content.getContent( "Hello from ", controller_name(), action_name() ) I want to dry up the code and get rid of the controller and action calls and move it to the model where it belongs, but the controller_name and action_name functions are not available in the model. My question, is there any way for the code in the model to discover where the function was called from so that that information can be made available to the function without having to explicitly pass it. Hope someone can help, -- Will -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.