yes you are right. my example was wrong.
actually the second method ain’t in an controller, but in an
initializer. and what i really wanted to do is log the calling
controller_name and method_name. but i wanted to achieve this without
having to add more parameters to my method call.
of course i could just say:
but i’m lazy and i don’t want to type “(self.controller_name,
self.method_name)” all the time, so i thought tried to find a way to
figure out these infos inside the say_my_name-method.
if there ain’t anything better than to parse caller, i’m gonna go with
On 14 Nov., 12:30, “Enrico Thierbach”
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.