Create controller dynamically?

V

Varun Goel

Hi All,
I wanna create controller dynamically through my ruby code.

Please help me out.

Suppose i have one controller if i call a function of this controller so
i wanna create another controller dynamically.That can be one or n
numbers of controllers.

Please help me ............
Thanks
Varun
 
G

Glen Holcomb

[Note: parts of this message were removed to make it a legal post.]

Hi All,
I wanna create controller dynamically through my ruby code.

Please help me out.

Suppose i have one controller if i call a function of this controller so
i wanna create another controller dynamically.That can be one or n
numbers of controllers.

Please help me ............
Thanks
Varun
You really probably want to post this on the rails list. It is probably
do-able but the structure of rails puts it a bit beyond the scope of just
ruby. You will have to dynamically define classes but with rails assuming
those classes will be in separate files you might have to do some
significant unpleasantness.
 
P

Phlip

Varun said:
Suppose i have one controller if i call a function of this controller so
i wanna create another controller dynamically.That can be one or n
numbers of controllers.

What's the actual problem you need to solve?

A controller is (generally) a class, with instances declared on the fly, one per
input event.

Also, if you mean a Rails controller, you might get better help on a Rails
forum. Ruby is not Rails!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,600
Members
45,179
Latest member
pkhumanis73
Top