Calling the controller in string

Hi,
I have string or symbol that holds a controllers name (like ‘user’ or
:user). How can I call one of the class methods of this controller?
Thanks in advance

On Thursday 17 November 2005 15:42, Onur T. wrote:

Hi,
I have string or symbol that holds a controllers name (like ‘user’
or :user). How can I call one of the class methods of this
controller?
Try:
str = “user” # or :user
kontroller = “#{str}_controller”.camelize.constantize
kontroller.any_method_you_want