thanks!

i just needed it for some log-entries anyway. so there is no need to
find a cleaner way.

On 14 Nov., 12:08, Frederick Cheung <[EMAIL PROTECTED]>
wrote:
> On 14 Nov 2008, at 10:57, MaD wrote:
>
>
>
> > hi everyone,
>
> > i got a simple question that's bothering me all day:
> > is it possible to find out which method and controller did the
> > original call?
>
> You can screw around with caller but that's not a very clean way to go  
> about things.
>
> Fred
>
> > to make this a little clearer, I want to do the following:
> > (let's say these two methods are in different controllers)
>
> > def first_method
> >  say_my_name
> > end
>
> > def say_my_name
> >  # how do i get the original method and controller
> >  # invoking_method = ?
> >  # invoking_controller =?
> >  puts invoking_method
> >  puts invoking_controller
> > end
>
> > any help is appreciated!
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to